amd.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## amd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: amd
  26. Summary: Auto-Mounting Daemon
  27. URL: http://www.am-utils.org/
  28. Vendor: UCB
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: System
  32. License: BSD
  33. Version: 6.0.7
  34. Release: %{l_branch}.0
  35. # list of sources
  36. Source0: ftp://ftp.am-utils.org/pub/am-utils/am-utils-%{version}.tar.gz
  37. Source1: amd.conf
  38. Source2: rc.amd
  39. Patch0: am-utils-%{version}.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20011023.0, flex
  44. PreReq: OpenPKG, openpkg >= 20011023.0
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. An automounting daemon maintains a cache of mounted filesystems.
  49. Filesystems are mounted on demand when they are first referenced,
  50. and unmounted after a period of inactivity. Amd may be used as a
  51. replacement for Sun's original automounter. The choice of which
  52. filesystem to mount can be controlled dynamically with selectors.
  53. Selectors allow decisions of the form "hostname is this," or
  54. "architecture is not that." Selectors may be combined arbitrarily.
  55. Amd also supports a variety of filesystem types, including NFS,
  56. UFS and the novel program filesystem. The combination of selectors
  57. and multiple filesystem types allows identical configuration
  58. files to be used on all machines thus reducing the administrative
  59. overhead. Amd ensures that it will not hang if a remote server goes
  60. down. Moreover, Amd can determine when a remote server has become
  61. inaccessible and then mount replacement filesystems as and when they
  62. become available.
  63. %prep
  64. %setup -q -n am-utils-%{version}
  65. %patch -p1
  66. %build
  67. PATH="%{l_prefix}/bin:$PATH"; export PATH
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --sysconfdir=%{l_prefix}/etc/amd \
  73. --disable-debug \
  74. --disable-shared
  75. %{l_make} %{l_mflags}
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  79. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  80. rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/automount2amd
  81. rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/amd2sun
  82. rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/amd2ldif
  83. rm -f $RPM_BUILD_ROOT%{l_prefix}/man8/automount2amd.8
  84. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/amd/*
  85. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
  86. %{l_shtool} install -c -m 644 -e "s;@l_prefix@;%{l_prefix};g" \
  87. %{SOURCE amd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/amd/
  88. %{l_shtool} mkdir -f -p -m 755 \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  90. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  91. %{SOURCE rc.amd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/var/amd
  94. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  95. %{l_files_std} \
  96. '%config %{l_prefix}/etc/amd/amd.conf'
  97. %files -f files
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT