- Merge review fixes, based on a patch by Parag AN:
- Use %%{_localstatedir}/lib instead of hard-coding /var/lib - Use %%{?_smp_mflags} - Preserve file time stamps - Only create the group if it doesn't exist, hide errors from rpm
This commit is contained in:
parent
eee1b3a512
commit
e383274ce3
31
mlocate.spec
31
mlocate.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: An utility for finding files by name
|
Summary: An utility for finding files by name
|
||||||
Name: mlocate
|
Name: mlocate
|
||||||
Version: 0.21.1
|
Version: 0.21.1
|
||||||
Release: 2
|
Release: 3
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://fedorahosted.org/mlocate/
|
URL: https://fedorahosted.org/mlocate/
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -28,18 +28,18 @@ trash the system caches as much as traditional locate implementations.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --localstatedir=/var/lib
|
%configure --localstatedir=%{_localstatedir}/lib
|
||||||
make groupname=slocate
|
make %{?_smp_mflags} groupname=slocate
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT groupname=slocate
|
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' groupname=slocate
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.daily}
|
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.daily}
|
||||||
install -c -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/updatedb.conf
|
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/updatedb.conf
|
||||||
install -c -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/mlocate.cron
|
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/mlocate.cron
|
||||||
# %%ghost semantic is so stupid
|
# %%ghost semantic is so stupid
|
||||||
touch $RPM_BUILD_ROOT/var/lib/mlocate/mlocate.db
|
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/mlocate/mlocate.db
|
||||||
|
|
||||||
%find_lang mlocate
|
%find_lang mlocate
|
||||||
|
|
||||||
@ -47,7 +47,8 @@ touch $RPM_BUILD_ROOT/var/lib/mlocate/mlocate.db
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%{_sbindir}/groupadd -g 21 -r -f slocate
|
getent group slocate >/dev/null || groupadd -g 21 -r -f slocate
|
||||||
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if /bin/grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then
|
if /bin/grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then
|
||||||
@ -55,7 +56,8 @@ if /bin/grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%triggerpostun -- slocate <= 2.7-30
|
%triggerpostun -- slocate <= 2.7-30
|
||||||
%{_sbindir}/groupadd -g 21 -r -f slocate
|
getent group slocate >/dev/null || groupadd -g 21 -r -f slocate
|
||||||
|
exit 0
|
||||||
|
|
||||||
%files -f mlocate.lang
|
%files -f mlocate.lang
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -65,10 +67,17 @@ fi
|
|||||||
%attr(2711,root,slocate) %{_bindir}/locate
|
%attr(2711,root,slocate) %{_bindir}/locate
|
||||||
%{_bindir}/updatedb
|
%{_bindir}/updatedb
|
||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
%dir %attr(0750,root,slocate) /var/lib/mlocate
|
%dir %attr(0750,root,slocate) %{_localstatedir}/lib/mlocate
|
||||||
%ghost /var/lib/mlocate/mlocate.db
|
%ghost %{_localstatedir}/lib/mlocate/mlocate.db
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 12 2009 Miloslav Trmač <mitr@redhat.com> - 0.21.1-3
|
||||||
|
- Merge review fixes, based on a patch by Parag AN:
|
||||||
|
- Use %%{_localstatedir}/lib instead of hard-coding /var/lib
|
||||||
|
- Use %%{?_smp_mflags}
|
||||||
|
- Preserve file time stamps
|
||||||
|
- Only create the group if it doesn't exist, hide errors from rpm
|
||||||
|
|
||||||
* Fri Nov 28 2008 Miloslav Trmač <mitr@redhat.com> - 0.21.1-2
|
* Fri Nov 28 2008 Miloslav Trmač <mitr@redhat.com> - 0.21.1-2
|
||||||
- Add .git to PRUNENAMES
|
- Add .git to PRUNENAMES
|
||||||
Resolves: #473227
|
Resolves: #473227
|
||||||
|
Loading…
Reference in New Issue
Block a user