]>
Commit | Line | Data |
---|---|---|
e6c51549 | 1 | Summary: A locate/updatedb implementation |
91b0e6c5 | 2 | Summary(pl.UTF-8): Implementacja locate/updatedb |
e6c51549 | 3 | Name: mlocate |
e85dc51a | 4 | Version: 0.26 |
bff257ef | 5 | Release: 3 |
e6c51549 SP |
6 | License: GPL v2 |
7 | Group: Applications/System | |
df1b3b8b | 8 | Source0: https://fedorahosted.org/releases/m/l/mlocate/%{name}-%{version}.tar.xz |
e85dc51a | 9 | # Source0-md5: 539e6f86bf387358aa2b14d5f880e49a |
75904e89 ER |
10 | Source1: updatedb.conf |
11 | Source2: %{name}.cron | |
e6c51549 SP |
12 | URL: https://fedorahosted.org/mlocate/ |
13 | BuildRequires: rpmbuild(macros) >= 1.228 | |
df1b3b8b | 14 | BuildRequires: tar >= 1:1.22 |
1020fe33 | 15 | BuildRequires: xz |
d9690330 ER |
16 | Requires(postun): /usr/sbin/groupdel |
17 | Requires(pre): /usr/bin/getgid | |
18 | Requires(pre): /usr/sbin/groupadd | |
d9542492 | 19 | Requires: awk |
75904e89 | 20 | Requires: crondaemon |
d9690330 | 21 | Provides: group(mlocate) |
2ed6c857 JB |
22 | Provides: locate-utility |
23 | Obsoletes: locate-utility | |
e6c51549 SP |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
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. | |
33 | ||
91b0e6c5 JB |
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. | |
42 | ||
e6c51549 SP |
43 | %prep |
44 | %setup -q | |
45 | ||
46 | %build | |
519cabe8 SP |
47 | %configure \ |
48 | --localstatedir=/var/lib | |
091f13d9 | 49 | %{__make} |
e6c51549 SP |
50 | |
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
e6c51549 | 53 | %{__make} install \ |
3515e12e | 54 | INSTALL='install -p' \ |
e6c51549 SP |
55 | DESTDIR=$RPM_BUILD_ROOT |
56 | ||
75904e89 | 57 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.daily} |
3515e12e | 58 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/updatedb.conf |
3f92fc46 | 59 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/%{name}.cron |
75904e89 ER |
60 | touch $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/%{name}.db |
61 | ||
e6c51549 SP |
62 | %find_lang %{name} |
63 | ||
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
519cabe8 | 67 | %pre |
75904e89 | 68 | %groupadd -g 196 %{name} |
519cabe8 SP |
69 | |
70 | %post | |
75904e89 ER |
71 | if [ ! -f %{_localstatedir}/lib/%{name}/%{name}.db ]; then |
72 | echo 'Run "%{_bindir}/updatedb" if you want to make %{name} database immediately.' | |
519cabe8 SP |
73 | fi |
74 | ||
75 | %postun | |
76 | if [ "$1" = "0" ]; then | |
75904e89 | 77 | %groupremove %{name} |
519cabe8 SP |
78 | fi |
79 | ||
e6c51549 SP |
80 | %files -f %{name}.lang |
81 | %defattr(644,root,root,755) | |
91b0e6c5 | 82 | %doc AUTHORS ChangeLog NEWS README |
3f92fc46 | 83 | %attr(755,root,root) /etc/cron.daily/%{name}.cron |
75904e89 | 84 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/updatedb.conf |
2ed6c857 | 85 | %attr(2755,root,mlocate) %{_bindir}/locate |
705a9b28 | 86 | %attr(755,root,root) %{_bindir}/updatedb |
2ed6c857 | 87 | %{_mandir}/man1/locate.1* |
75904e89 | 88 | %{_mandir}/man5/%{name}.db.5* |
2ed6c857 JB |
89 | %{_mandir}/man5/updatedb.conf.5* |
90 | %{_mandir}/man8/updatedb.8* | |
75904e89 ER |
91 | %dir %attr(750,root,mlocate) /var/lib/%{name} |
92 | %ghost %{_localstatedir}/lib/%{name}/%{name}.db |