+#
+# Conditional build:
+%bcond_without selinux # build without SELinux support
+#
Summary: GNU Find Utilities (find, xargs)
Summary(de): GNU-Suchprogramme (find, xargs)
Summary(es): Utilitarios de búsqueda de la GNU
Summary(fr): Utilitaires de recherche de GNU (find, xargs)
-Summary(pl): GNU narzêdzia do odnajdywania plików (find, xargs)
+Summary(pl): Narzêdzia GNU do odnajdywania plików (find, xargs)
Summary(pt_BR): Utilitários de procura da GNU
Summary(tr): GNU dosya arama araçlarý
Name: findutils
-Version: 4.1.7
-Release: 5
+Version: 4.2.28
+Release: 1
Epoch: 1
License: GPL
Group: Applications/File
-Group(de): Applikationen/Datei
-Group(es): Aplicaciones/Archivos
-Group(fr): Applications/Fichiers
-Group(pl): Aplikacje/Pliki
-Group(pt): Aplicações/Ficheiros
-Group(pt_BR): Aplicações/Arquivos
-Source0: ftp://alpha.gnu.org/gnu/%{name}-%{version}.tar.gz
-Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+# development versions at ftp://alpha.gnu.org/gnu/findutils/
+Source0: ftp://ftp.gnu.org/gnu/findutils/%{name}-%{version}.tar.gz
+# Source0-md5: f5fb3349354ee3d94fceb81dab5c71fd
+#Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
+Source1: %{name}-non-english-man-pages.tar.bz2
+# Source1-md5: e76388b0c3218eec3557d05ccd6d6515
Patch0: %{name}-info.patch
-Patch2: %{name}-mktemp.patch
-Patch3: %{name}-getshort.patch
-Patch4: %{name}-DESTDIR.patch
-Patch5: %{name}-am-workaround.patch
-Patch6: %{name}-xargs_help_cr.patch
+Patch1: %{name}-selinux.patch
+Patch2: %{name}-man-selinux.patch
+Patch3: %{name}-pl.po-update.patch
+URL: http://www.gnu.org/software/findutils/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gettext-devel
+%{?with_selinux:BuildRequires: libselinux-devel}
BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
arayabilirsiniz.
%prep
-%setup -q
-%patch0 -p1
-%patch2 -p1
+%setup -q
%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
+%patch0 -p1
+%{?with_selinux:%patch1 -p1}
+# patch2 is applied in install stage
+
+rm -f po/stamp-po
%build
-touch lib/{stat,lstat}.c
-%configure
+%{__aclocal} -I gnulib/m4 -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-
+
bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+%{?with_selinux:patch -p0 -d $RPM_BUILD_ROOT%{_mandir} < %{PATCH2}}
+
+# xargs is wanted in /bin
+install -d $RPM_BUILD_ROOT/bin
+mv $RPM_BUILD_ROOT%{_bindir}/xargs $RPM_BUILD_ROOT/bin
+
+# unpackaged locate
+rm -f $RPM_BUILD_ROOT%{_bindir}/{locate,updatedb} \
+ $RPM_BUILD_ROOT%{_libdir}/{bigram,code,frcode} \
+ $RPM_BUILD_ROOT%{_mandir}/{,*/}man?/{locate.1,updatedb.1,locatedb.5}*
+
+rm -f $RPM_BUILD_ROOT{%{_infodir}/dir,%{_mandir}/README.findutils-non-english-man-pages}
-gzip -9nf NEWS README TODO ChangeLog
-
%find_lang %{name}
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%post
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
%postun
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc {NEWS,README,TODO,ChangeLog}.gz
+%doc NEWS README TODO ChangeLog
%attr(755,root,root) %{_bindir}/find
-%attr(755,root,root) %{_bindir}/xargs
+%attr(755,root,root) /bin/xargs
%{_mandir}/man1/[fx]*
%lang(de) %{_mandir}/de/man1/[fx]*
%lang(ja) %{_mandir}/ja/man1/[fx]*
%lang(nl) %{_mandir}/nl/man1/[fx]*
%lang(pl) %{_mandir}/pl/man1/[fx]*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/[fx]*
%{_infodir}/find.info*