| 1 | #define svn_url     e:/trees/findutils/trunk | 
|---|
| 2 | %define svn_url     http://svn.netlabs.org/repos/ports/findutils/trunk | 
|---|
| 3 | %define svn_rev     1746 | 
|---|
| 4 |  | 
|---|
| 5 | Summary: The GNU versions of find utilities (find and xargs) | 
|---|
| 6 | Name: findutils | 
|---|
| 7 | Version: 4.6.0 | 
|---|
| 8 | Release: 2%{?dist} | 
|---|
| 9 | Epoch: 1 | 
|---|
| 10 | License: GPLv3+ | 
|---|
| 11 | Group: Applications/File | 
|---|
| 12 | URL: http://www.gnu.org/software/findutils/ | 
|---|
| 13 | Vendor:  bww bitwise works GmbH | 
|---|
| 14 | Source:  %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip | 
|---|
| 15 |  | 
|---|
| 16 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 17 | BuildRequires: libtool, automake, autoconf | 
|---|
| 18 | BuildRequires: texinfo | 
|---|
| 19 | #BuildRequires: dejagnu | 
|---|
| 20 |  | 
|---|
| 21 | #Requires(post): /sbin/install-info | 
|---|
| 22 | #Requires(preun): /sbin/install-info | 
|---|
| 23 |  | 
|---|
| 24 | %description | 
|---|
| 25 | The findutils package contains programs which will help you locate | 
|---|
| 26 | files on your system.  The find utility searches through a hierarchy | 
|---|
| 27 | of directories looking for files which match a certain set of criteria | 
|---|
| 28 | (such as a file name pattern).  The xargs utility builds and executes | 
|---|
| 29 | command lines from standard input arguments (usually lists of file | 
|---|
| 30 | names generated by the find command). | 
|---|
| 31 |  | 
|---|
| 32 | You should install findutils because it includes tools that are very | 
|---|
| 33 | useful for finding things on your system. | 
|---|
| 34 |  | 
|---|
| 35 | %debug_package | 
|---|
| 36 |  | 
|---|
| 37 | %prep | 
|---|
| 38 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} | 
|---|
| 39 | %setup -q | 
|---|
| 40 | %else | 
|---|
| 41 | %setup -n "%{name}-%{version}" -Tc | 
|---|
| 42 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force | 
|---|
| 43 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" | 
|---|
| 44 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") | 
|---|
| 45 | %endif | 
|---|
| 46 |  | 
|---|
| 47 | autoreconf -fiv | 
|---|
| 48 |  | 
|---|
| 49 | %build | 
|---|
| 50 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" | 
|---|
| 51 | export LIBS="-lcx -lpthread" | 
|---|
| 52 | %configure | 
|---|
| 53 |  | 
|---|
| 54 | make %{?_smp_mflags} | 
|---|
| 55 |  | 
|---|
| 56 | #%check | 
|---|
| 57 | #make check | 
|---|
| 58 |  | 
|---|
| 59 | %install | 
|---|
| 60 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 61 | make install DESTDIR=$RPM_BUILD_ROOT | 
|---|
| 62 |  | 
|---|
| 63 | rm -f %{buildroot}%{_infodir}/dir | 
|---|
| 64 |  | 
|---|
| 65 | # yd move conflicting tools to libexec/bin and place a symlink for script compatibility | 
|---|
| 66 | mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/bin | 
|---|
| 67 | for i in find; do | 
|---|
| 68 | mv $RPM_BUILD_ROOT%{_bindir}/$i.exe $RPM_BUILD_ROOT%{_libexecdir}/bin/$i.exe | 
|---|
| 69 | ln -s %{_libexecdir}/bin/$i.exe $RPM_BUILD_ROOT%{_bindir}/$i | 
|---|
| 70 | done | 
|---|
| 71 |  | 
|---|
| 72 | %find_lang %{name} | 
|---|
| 73 |  | 
|---|
| 74 | %post | 
|---|
| 75 | #if [ -f %{_infodir}/find.info.gz ]; then | 
|---|
| 76 | #  /sbin/install-info %{_infodir}/find.info.gz %{_infodir}/dir || : | 
|---|
| 77 | #fi | 
|---|
| 78 |  | 
|---|
| 79 | %preun | 
|---|
| 80 | #if [ $1 = 0 ]; then | 
|---|
| 81 | #  if [ -f %{_infodir}/find.info.gz ]; then | 
|---|
| 82 | #    /sbin/install-info --delete %{_infodir}/find.info.gz %{_infodir}/dir || : | 
|---|
| 83 | #  fi | 
|---|
| 84 | #fi | 
|---|
| 85 |  | 
|---|
| 86 | %clean | 
|---|
| 87 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 88 |  | 
|---|
| 89 | %files -f %{name}.lang | 
|---|
| 90 | %defattr(-,root,root,-) | 
|---|
| 91 | %{!?_licensedir:%global license %%doc} | 
|---|
| 92 | %license COPYING | 
|---|
| 93 | %doc AUTHORS NEWS README THANKS TODO | 
|---|
| 94 | %{_bindir}/find | 
|---|
| 95 | %{_bindir}/xargs.exe | 
|---|
| 96 | %{_bindir}/locate.exe | 
|---|
| 97 | %{_bindir}/updatedb | 
|---|
| 98 | %{_libexecdir}/* | 
|---|
| 99 | %{_mandir}/man1/* | 
|---|
| 100 | %{_mandir}/man5/* | 
|---|
| 101 | %{_infodir}/find.info* | 
|---|
| 102 | %{_infodir}/find-maint.info | 
|---|
| 103 | %{_datadir}/locale/* | 
|---|
| 104 | %exclude %{_libexecdir}/*.dbg | 
|---|
| 105 | %exclude %{_libexecdir}/bin/*.dbg | 
|---|
| 106 |  | 
|---|
| 107 | %changelog | 
|---|
| 108 | * Mon Oct 24 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 4.6.0-2 | 
|---|
| 109 | - fix locate --statistics | 
|---|
| 110 | - use ; as path seperator | 
|---|
| 111 |  | 
|---|
| 112 | * Wed Oct 05 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 4.6.0-1 | 
|---|
| 113 | - udated version to 4.6.0 | 
|---|
| 114 | - adjusted spec to latest toolset | 
|---|
| 115 |  | 
|---|
| 116 | * Sat Mar 15 2014 yd | 
|---|
| 117 | - fixed libexec dir for symlinks. | 
|---|
| 118 | - added debug package with symbolic info for exceptq. | 
|---|
| 119 |  | 
|---|
| 120 | * Tue Jul 30 2013 yd | 
|---|
| 121 | - disabled FTS code, now find works as before. | 
|---|
| 122 |  | 
|---|
| 123 | * Wed Jul 24 2013 yd | 
|---|
| 124 | - move conflicting tools to libexec/bin. | 
|---|
| 125 |  | 
|---|
| 126 | * Wed Jun 05 2013 yd | 
|---|
| 127 | - r641, fix xargs stop in freadahead. | 
|---|
| 128 |  | 
|---|
| 129 | * Thu Mar 14 2013 yd | 
|---|
| 130 | - rename find.exe to find-unix.exe and add symlink. | 
|---|
| 131 |  | 
|---|
| 132 | * Sun Jan 08 2012 yd | 
|---|
| 133 | - initial unixroot build | 
|---|