File findutils.spec of Package findutils
#
# spec file for package findutils
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: findutils
Url: http://www.gnu.org/software/findutils/
Version: 2013
Release: 0
Summary: The GNU versions of find utilities (find and xargs)
License: GPL-3.0-or-later
Group: Productivity/File utilities
# For upgrading you now just need to increase the version, remove the old
# tarballs, then run osc service localrun download_files, osc addremove,
# osc vc and osc ci and you are done.
Source0: %{name}/%{name}-%{version}.tar.gz
Source10: https://translationproject.org/latest/findutils/be.po
Source11: https://translationproject.org/latest/findutils/bg.po
Source12: https://translationproject.org/latest/findutils/ca.po
Source13: https://translationproject.org/latest/findutils/cs.po
Source14: https://translationproject.org/latest/findutils/da.po
Source15: https://translationproject.org/latest/findutils/de.po
Source16: https://translationproject.org/latest/findutils/el.po
Source17: https://translationproject.org/latest/findutils/eo.po
Source18: https://translationproject.org/latest/findutils/es.po
Source19: https://translationproject.org/latest/findutils/et.po
Source20: https://translationproject.org/latest/findutils/fi.po
Source21: https://translationproject.org/latest/findutils/fr.po
Source22: https://translationproject.org/latest/findutils/ga.po
Source23: https://translationproject.org/latest/findutils/gl.po
Source24: https://translationproject.org/latest/findutils/hr.po
Source25: https://translationproject.org/latest/findutils/hu.po
Source26: https://translationproject.org/latest/findutils/id.po
Source27: https://translationproject.org/latest/findutils/it.po
Source28: https://translationproject.org/latest/findutils/ja.po
Source29: https://translationproject.org/latest/findutils/ka.po
Source30: https://translationproject.org/latest/findutils/ko.po
Source31: https://translationproject.org/latest/findutils/lg.po
Source32: https://translationproject.org/latest/findutils/lt.po
Source33: https://translationproject.org/latest/findutils/ms.po
Source34: https://translationproject.org/latest/findutils/nb.po
Source35: https://translationproject.org/latest/findutils/nl.po
Source36: https://translationproject.org/latest/findutils/pl.po
Source37: https://translationproject.org/latest/findutils/pt.po
Source38: https://translationproject.org/latest/findutils/pt_BR.po
Source39: https://translationproject.org/latest/findutils/ro.po
Source40: https://translationproject.org/latest/findutils/ru.po
Source41: https://translationproject.org/latest/findutils/sk.po
Source42: https://translationproject.org/latest/findutils/sl.po
Source43: https://translationproject.org/latest/findutils/sr.po
Source44: https://translationproject.org/latest/findutils/sv.po
Source45: https://translationproject.org/latest/findutils/tr.po
Source46: https://translationproject.org/latest/findutils/uk.po
Source47: https://translationproject.org/latest/findutils/vi.po
Source48: https://translationproject.org/latest/findutils/zh_CN.po
Source49: https://translationproject.org/latest/findutils/zh_TW.po
# adds a new option -xautofs to find to not descend into directories on autofs file systems
#Patch0: findutils-4.4.2-xautofs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# BuildRequire dejagnu for 'runtest' to execute all tests.
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: groff
BuildRequires: libselinux-devel
BuildRequires: makeinfo
Provides: find = %{version}
Obsoletes: find < %{version}
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
%description
The findutils package contains programs which will help you locate
files on your system. The find utility searches through a hierarchy
of directories looking for files which match a certain set of criteria
(such as a file name pattern). The xargs utility builds and executes
command lines from standard input arguments (usually lists of file
names generated by the find command).
You should install findutils because it includes tools that are very
useful for finding things on your system.
%lang_package
%prep
%setup -q
cp -vt po %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26} %{SOURCE27} %{SOURCE28} %{SOURCE29} %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} %{SOURCE34} %{SOURCE35} %{SOURCE36} %{SOURCE37} %{SOURCE38} %{SOURCE39} %{SOURCE40} %{SOURCE41} %{SOURCE42} %{SOURCE43} %{SOURCE44} %{SOURCE45} %{SOURCE46} %{SOURCE47} %{SOURCE48} %{SOURCE49}
#%%patch0
%build
cd po
ls -1 *.po | sed 's/\.po$//' > LINGUAS
cd ..
# As we don't have a full git clone (where 'git describe' would work to
# determine the version, derive the version from the directory name.
v_="${PWD##*/findutils-v}"
echo "$v_" > .tarball-version
# Remove dependenies superfluous for this build.
sed -i.bak -e '/^texi2pdf/d; /^wget/d' bootstrap.conf
./bootstrap --no-bootstrap-sync --no-git --gnulib-srcdir=gnulib --skip-po
mkdir build-dist
cd build-dist
../configure
make all dist
cd ..
mkdir build
cd build
tar -xf ../build-dist/%{name}-$v_.tar.xz
cd %{name}-$v_
%configure \
--libexecdir=%{_libdir}/find \
--localstatedir=/var/lib
make %{?_smp_mflags}
%check
v_="$( cat .tarball-version )"
cd build/%{name}-$v_
make check \
|| { grep . */test-suite.log; exit 1; }
%install
v_="$( cat .tarball-version )"
cd build/%{name}-$v_
make DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_infodir}/find-maint*
%find_lang %{name}
cp -lv %{name}.lang ../..
%if 0%{?suse_version} < 1550
mkdir -p %{buildroot}/bin
ln -sf %{_bindir}/find %{buildroot}/bin
%endif
%post
%install_info --info-dir=%{_infodir} %{_infodir}/find.info.gz
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/find.info.gz
%files
%defattr(-,root,root,-)
%license COPYING
%doc AUTHORS NEWS README THANKS TODO
%if 0%{?suse_version} < 1550
/bin/find
%endif
%{_bindir}/find
%{_bindir}/xargs
%{_bindir}/locate
%{_bindir}/updatedb
%{_libdir}/find
%doc %{_infodir}/find.info*.gz
%doc %{_mandir}/man1/find.1.gz
%doc %{_mandir}/man1/xargs.1.gz
%doc %{_mandir}/man1/locate.1.gz
%doc %{_mandir}/man1/updatedb.1.gz
%doc %{_mandir}/man5/locatedb.5.gz
%files lang -f %{name}.lang
%license COPYING
%changelog