findutils.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## findutils.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: findutils
  25. Summary: GNU Find Utilities
  26. URL: http://www.gnu.org/software/findutils/
  27. Vendor: Free Software Foundation
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: BASE
  31. Group: ShellUtils
  32. License: GPL
  33. Version: 4.4.0
  34. Release: 20080315
  35. # package options
  36. %option with_largefile no
  37. # list of sources
  38. Source0: ftp://ftp.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 >= 20060823, make, gcc
  45. PreReq: OpenPKG, openpkg >= 20060823, 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://ftp.gnu.org/gnu/findutils/
  54. regex = findutils-(__VER__)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q
  58. %patch -p0
  59. %build
  60. CC="%{l_cc}" \
  61. CFLAGS="%{l_cflags -O}" \
  62. SORT="%{l_prefix}/bin/gsort" \
  63. GREP="grep" \
  64. ./configure \
  65. --prefix=%{l_prefix} \
  66. --libdir=%{l_prefix}/lib/findutils \
  67. --libexecdir=%{l_prefix}/libexec/findutils \
  68. --datarootdir=%{l_prefix} \
  69. --localstatedir=%{l_prefix}/var/findutils \
  70. %if "%{with_largefile}" == "yes"
  71. --enable-largefile \
  72. %else
  73. --disable-largefile \
  74. %endif
  75. --disable-nls
  76. %{l_make} %{l_mflags}
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. %{l_make} %{l_mflags} install \
  80. AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  83. $RPM_BUILD_ROOT%{l_prefix}/var/findutils
  84. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  85. %{SOURCE rc.findutils} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  86. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  87. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
  88. strip $RPM_BUILD_ROOT%{l_prefix}/libexec/findutils/* 2>/dev/null || true
  89. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  90. %files -f files
  91. %clean
  92. rm -rf $RPM_BUILD_ROOT
  93. %preun
  94. if [ $1 -eq 0 ]; then
  95. rm -f $RPM_INSTALL_PREFIX/var/findutils/locatedb >/dev/null 2>&1 || true
  96. fi