]> git.pld-linux.org Git - packages/mlocate.git/blob - mlocate.spec
- up to 0.26
[packages/mlocate.git] / mlocate.spec
1 Summary:        A locate/updatedb implementation
2 Summary(pl.UTF-8):      Implementacja locate/updatedb
3 Name:           mlocate
4 Version:        0.26
5 Release:        1
6 License:        GPL v2
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
11 Source2:        %{name}.cron
12 URL:            https://fedorahosted.org/mlocate/
13 BuildRequires:  rpmbuild(macros) >= 1.228
14 BuildRequires:  tar >= 1:1.22
15 BuildRequires:  xz
16 Requires(postun):       /usr/sbin/groupdel
17 Requires(pre):  /usr/bin/getgid
18 Requires(pre):  /usr/sbin/groupadd
19 Requires:       awk
20 Requires:       crondaemon
21 Provides:       group(mlocate)
22 Provides:       locate-utility
23 Obsoletes:      locate-utility
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
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
43 %prep
44 %setup -q
45
46 %build
47 %configure \
48         --localstatedir=/var/lib
49 %{__make}
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 %{__make} install \
54         INSTALL='install -p' \
55         DESTDIR=$RPM_BUILD_ROOT
56
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
61
62 %find_lang %{name}
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %pre
68 %groupadd -g 196 %{name}
69
70 %post
71 if [ ! -f %{_localstatedir}/lib/%{name}/%{name}.db ]; then
72         echo 'Run "%{_bindir}/updatedb" if you want to make %{name} database immediately.'
73 fi
74
75 %postun
76 if [ "$1" = "0" ]; then
77         %groupremove %{name}
78 fi
79
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
This page took 0.068781 seconds and 3 git commands to generate.