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 # Use /proc/mounts instead of /etc/mtab as autofs entries are only
12 # listed in the kernels >= 2.6.32
13 Patch0:         findutils-4.5.10-use_proc_mounts.patch
14 # adds a new option -xautofs to find to not descend into directories on autofs file systems
15 Patch1:         findutils-4.4.2-xautofs.patch
16 Patch2:         findutils-4.4.2-updatedb.patch
17 Patch3:         findutils-4.5.10-prune_unknown.patch
18 Patch4:         findutils-4.5.10-updatedb_ignore_nfsv4.patch
19 Patch5:         findutils-stdio.in.patch
20 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
21
22 %description
23 The findutils package contains programs which will help you locate
24 files on your system.  The find utility searches through a hierarchy
25 of directories looking for files which match a certain set of criteria
26 (such as a file name pattern).  The xargs utility builds and executes
27 command lines from standard input arguments (usually lists of file
28 names generated by the find command).
29
30 You should install findutils because it includes tools that are very
31 useful for finding things on your system.
32
33
34 %lang_package
35 %package locate
36 Summary:        Tool for Locating Files (findutils subpackage)
37 Group:          Productivity/File utilities
38 Provides:       findutils:/usr/bin/locate
39 Requires:       findutils = %{version}
40
41 %description locate
42 This package contains the locate program which is part of the GNU
43 findutils software suite.
44
45 You can find files fast using locate.  On installing findutils-locate
46 an additional daily cron job will be added to the cron system. This
47 job will update the files database every night or shortly after
48 switching on the computer.
49
50 %prep
51 %setup -q
52 %patch0
53 %patch1 -p1
54 %patch2
55 %patch3
56 %patch4
57 %patch5 -p1
58
59 %build
60 %ifarch %arm armv5tel armv7l armv7el armv5el
61 # this is a workaround for a qemu-user bug, we hit. A qemu patch is being discussed, but for now ...
62 export DEFAULT_ARG_SIZE="(31u * 1024u)"
63 %endif
64 %configure \
65   --libexecdir=%{_libdir}/find \
66   --localstatedir=/var/lib \
67   --without-included-regex \
68   --without-fts \
69   --enable-d_type-optimisation
70 make %{?_smp_mflags}
71
72 %check
73 make check
74
75 %install
76 make install DESTDIR=$RPM_BUILD_ROOT
77 install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/locate
78 rm -f $RPM_BUILD_ROOT%{_bindir}/oldfind
79 rm -f $RPM_BUILD_ROOT%{_bindir}/ftsfind
80 rm -f $RPM_BUILD_ROOT%{_infodir}/find-maint*
81 %find_lang %{name}
82
83 %docs_package
84
85 %files
86 %defattr(-,root,root,-)
87 %doc COPYING
88 %{_bindir}/find
89 %{_bindir}/xargs
90
91 %files locate
92 %defattr(-,root,root,-)
93 %{_bindir}/locate
94 %{_bindir}/updatedb
95 %{_libdir}/find
96 %config(noreplace) %{_sysconfigdir}/sysconfig/locate
97
98 %changelog