SPECS: mlocate.spec - groupadd -g 196 - proper directory for mloca...
paszczus
paszczus at pld-linux.org
Thu Apr 10 21:45:46 CEST 2008
Author: paszczus Date: Thu Apr 10 19:45:46 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- groupadd -g 196
- proper directory for mlocate.db
---- Files affected:
SPECS:
mlocate.spec (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SPECS/mlocate.spec
diff -u SPECS/mlocate.spec:1.4 SPECS/mlocate.spec:1.5
--- SPECS/mlocate.spec:1.4 Thu Apr 10 21:35:23 2008
+++ SPECS/mlocate.spec Thu Apr 10 21:45:41 2008
@@ -9,6 +9,9 @@
# Source0-md5: ad5e4eb1f2aecf1a5af9fe36c6e297f4
URL: https://fedorahosted.org/mlocate/
BuildRequires: rpmbuild(macros) >= 1.228
+Requires(postun): /usr/sbin/groupdel
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
Conflicts: slocate
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -24,11 +27,13 @@
%setup -q
%build
-%configure
+%configure \
+ --localstatedir=/var/lib
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/var/lib/mlocate
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -38,6 +43,20 @@
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+%groupadd -g 196 mlocate
+
+%post
+if [ ! -f /var/lib/mlocate/mlocate.db ]; then
+ echo 'Run "%{_bindir}/updatedb" if you want to make mlocate database immediately.'
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+ %groupremove mlocate
+fi
+
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc ABOUT-NLS AUTHORS ChangeLog NEWS README
@@ -46,6 +65,7 @@
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*
%{_mandir}/man8/*.8*
+%dir %attr(750,root,mlocate) /var/lib/mlocate
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -53,6 +73,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.5 2008-04-10 19:45:41 paszczus
+- groupadd -g 196
+- proper directory for mlocate.db
+
Revision 1.4 2008-04-10 19:35:23 shadzik
- no wildcards as binaries
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/mlocate.spec?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list