add packaging
[platform/upstream/findutils.git] / packaging / findutils.spec
1 Name:           findutils
2 Url:            http://www.gnu.org/software/findutils/
3 Version:        4.5.10
4 Release:        0
5 Summary:        The GNU versions of find utilities (find and xargs)
6 License:        GPL-3.0+
7 Group:          Productivity/File utilities
8 # retrieved from http://alpha.gnu.org/pub/gnu/findutils/findutils-4.5.10.tar.gz
9 Source:         findutils-%{version}.tar.bz2
10 Source1:        sysconfig.locate
11
12 %description
13 The findutils package contains programs which will help you locate
14 files on your system.  The find utility searches through a hierarchy
15 of directories looking for files which match a certain set of criteria
16 (such as a file name pattern).  The xargs utility builds and executes
17 command lines from standard input arguments (usually lists of file
18 names generated by the find command).
19
20 You should install findutils because it includes tools that are very
21 useful for finding things on your system.
22
23
24 %lang_package
25 %package locate
26 Summary:        Tool for Locating Files (findutils subpackage)
27 Group:          Productivity/File utilities
28 Provides:       findutils:/usr/bin/locate
29 Requires:       findutils = %{version}
30
31 %description locate
32 This package contains the locate program which is part of the GNU
33 findutils software suite.
34
35 You can find files fast using locate.  On installing findutils-locate
36 an additional daily cron job will be added to the cron system. This
37 job will update the files database every night or shortly after
38 switching on the computer.
39
40 %prep
41 %setup -q
42
43 %build
44 %ifarch %arm armv5tel armv7l armv7el armv5el
45 # this is a workaround for a qemu-user bug, we hit. A qemu patch is being discussed, but for now ...
46 export DEFAULT_ARG_SIZE="(31u * 1024u)"
47 %endif
48 %configure \
49   --libexecdir=%{_libdir}/find \
50   --localstatedir=/var/lib \
51   --without-included-regex \
52   --without-fts \
53   --enable-d_type-optimisation
54 make %{?_smp_mflags}
55
56 %check
57 make check
58
59 %install
60 make install DESTDIR=$RPM_BUILD_ROOT
61 install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/locate
62 rm -f $RPM_BUILD_ROOT%{_bindir}/oldfind
63 rm -f $RPM_BUILD_ROOT%{_bindir}/ftsfind
64 rm -f $RPM_BUILD_ROOT%{_infodir}/find-maint*
65 %find_lang %{name}
66
67 %docs_package
68
69 %files
70 %defattr(-,root,root,-)
71 %doc COPYING
72 %{_bindir}/find
73 %{_bindir}/xargs
74
75 %files locate
76 %defattr(-,root,root,-)
77 %{_bindir}/locate
78 %{_bindir}/updatedb
79 %{_libdir}/find
80 %config(noreplace) %{_sysconfigdir}/sysconfig/locate
81
82 %changelog