1 Summary: A locate/updatedb implementation
2 Summary(pl.UTF-8): Implementacja locate/updatedb
7 Group: Applications/System
8 Source0: https://fedorahosted.org/releases/m/l/mlocate/%{name}-%{version}.tar.xz
9 # Source0-md5: 539e6f86bf387358aa2b14d5f880e49a
10 Source1: updatedb.conf
12 URL: https://fedorahosted.org/mlocate/
13 BuildRequires: rpmbuild(macros) >= 1.228
14 BuildRequires: tar >= 1:1.22
16 Requires(postun): /usr/sbin/groupdel
17 Requires(pre): /usr/bin/getgid
18 Requires(pre): /usr/sbin/groupadd
21 Provides: group(mlocate)
22 Provides: locate-utility
23 Obsoletes: locate-utility
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 mlocate is a new locate implementation. The "m" stands for "merging",
28 because updatedb reuses the existing database to avoid rereading most
29 of the file system, which makes updatedb faster and does not trash the
30 system caches as much. The locate(1) utility is intended to be
31 completely compatible to slocate. It also attempts to be compatible to
32 GNU locate, when it does not conflict with slocate compatibility.
34 %description -l pl.UTF-8
35 mlocate to nowa implementacja locate. "m" oznacza "merging" (łącząca),
36 ponieważ updatedb wykorzystuje istniejącą bazę aby zapobiec ponownemu
37 odczytywaniu większości systemu plików, dzięki czemu updatedb działa
38 szybciej i nie czyści tak bardzo buforów systemowych. Narzędzie
39 locate(1) powinno być w pełni kompatybilne z slocate. Próbuje być
40 kompatybilne także z GNU locate, o ile nie jest to w konflikcie z
41 kompatybilnością z slocate.
48 --localstatedir=/var/lib
52 rm -rf $RPM_BUILD_ROOT
54 INSTALL='install -p' \
55 DESTDIR=$RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.daily}
58 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/updatedb.conf
59 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/%{name}.cron
60 touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/%{name}.db
65 rm -rf $RPM_BUILD_ROOT
68 %groupadd -g 196 %{name}
71 if [ ! -f %{_localstatedir}/lib/%{name}/%{name}.db ]; then
72 echo 'Run "%{_bindir}/updatedb" if you want to make %{name} database immediately.'
76 if [ "$1" = "0" ]; then
80 %files -f %{name}.lang
81 %defattr(644,root,root,755)
82 %doc AUTHORS ChangeLog NEWS README
83 %attr(755,root,root) /etc/cron.daily/%{name}.cron
84 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/updatedb.conf
85 %attr(2755,root,mlocate) %{_bindir}/locate
86 %attr(755,root,root) %{_bindir}/updatedb
87 %{_mandir}/man1/locate.1*
88 %{_mandir}/man5/%{name}.db.5*
89 %{_mandir}/man5/updatedb.conf.5*
90 %{_mandir}/man8/updatedb.8*
91 %dir %attr(750,root,mlocate) /var/lib/%{name}
92 %ghost %{_localstatedir}/lib/%{name}/%{name}.db