findutils.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ##
  2. ## findutils.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: findutils
  27. Summary: GNU Find Utilities
  28. URL: http://www.gnu.org/software/findutils/
  29. Vendor: Free Software Foundation
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: BASE
  33. Group: Utility
  34. License: GPL
  35. Version: 4.1.20
  36. Release: 20040604
  37. # list of sources
  38. Source0: ftp://alpha.gnu.org/gnu/findutils/findutils-%{version}.tar.gz
  39. Source1: rc.findutils
  40. Patch0: findutils.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130
  45. PreReq: OpenPKG, openpkg >= 20040130, coreutils
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. The GNU set of find utilities: find, locate, updatedb and xargs.
  50. %track
  51. prog findutils = {
  52. version = %{version}
  53. url = ftp://alpha.gnu.org/gnu/findutils/
  54. regex = findutils-(__VER__)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q
  58. %{l_shtool} subst \
  59. -e 's;| sort ;| %{l_prefix}/bin/gsort -T `%{l_prefix}/etc/rc --query findutils_tmpdir` ;g' \
  60. locate/updatedb.sh
  61. %patch -p0
  62. %build
  63. CC="%{l_cc}"
  64. CFLAGS="%{l_cflags -O}"
  65. CPPFLAGS=""
  66. case "%{l_platform -t}" in
  67. *-freebsd* ) CPPFLAGS="-DHAVE_F_FSTYPENAME_IN_STATFS" ;;
  68. esac
  69. export CC CFLAGS CPPFLAGS
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --libexecdir=%{l_prefix}/libexec/findutils \
  73. --localstatedir=%{l_prefix}/var/findutils \
  74. --disable-nls
  75. %{l_make} %{l_mflags}
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install \
  79. AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT localstatedir=$RPM_BUILD_ROOT%{l_prefix}/var/findutils"
  80. %{l_shtool} mkdir -f -p -m 755 \
  81. $RPM_BUILD_ROOT%{l_prefix}/var/findutils
  82. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  83. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  84. %{SOURCE rc.findutils} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  85. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  87. strip $RPM_BUILD_ROOT%{l_prefix}/libexec/findutils/* 2>/dev/null || true
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT
  92. %preun
  93. if [ $1 -eq 0 ]; then
  94. rm -f $RPM_INSTALL_PREFIX/var/findutils/locatedb >/dev/null 2>&1 || true
  95. fi