Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 3b6a1e8e63194bacfffd3c161ec8d5ec > files > 3

mlocate-0.18-2mdv2008.0.src.rpm

Summary:  An utility for finding files by name via a central database
Name:     mlocate
Version:  0.18
Release:  %mkrel 2
License:  GPL
Group:    File tools
URL:      http://carolina.mff.cuni.cz/~trmac/blog/mlocate/
Source0:  http://people.redhat.com/mitr/mlocate/mlocate-%version.tar.bz2
Source1:  updatedb.conf
Source2:  mlocate.cron
Requires(pre): shadow-utils
Requires(triggerpostun): shadow-utils
Requires(post): grep, sed
Obsoletes: slocate <= 3.1
Provides: slocate = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%description
Mlocate is a locate/updatedb implementation.  It keeps a database of
all existing files and allows you to lookup files by name.

The 'm' stands for "merging": updatedb reuses the existing database to avoid
rereading most of the file system, which makes updatedb faster and does not
trash the system caches as much as traditional locate implementations.

%prep
%setup -q

%build
%configure2_5x \
	--localstatedir=/var/lib \
	--disable-rpath

%make groupname=slocate

%install
rm -rf %{buildroot}
%makeinstall_std groupname=slocate

mkdir -p %{buildroot}%{_sysconfdir}/cron.daily
# install config file:
install -c -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/updatedb.conf
# install daily cron entry:
install -c -m 755 %{SOURCE2} %{buildroot}/etc/cron.daily/mlocate.cron
# for %ghost:
touch %{buildroot}/var/lib/mlocate/mlocate.db

%find_lang %{name}

%clean
rm -rf %{buildroot}

# for smooth updates:
%triggerpostun -- slocate <= 3.1
%{_sbindir}/groupadd -r -f slocate

%pre
%{_sbindir}/groupadd -r -f slocate 

%post
# for %ghost:
touch /var/lib/mlocate/mlocate.db

%files -f mlocate.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%config(noreplace) %{_sysconfdir}/updatedb.conf
%{_sysconfdir}/cron.daily/mlocate.cron
%attr(2711,root,slocate) %{_bindir}/locate
%{_bindir}/updatedb
%{_mandir}/man*/*
%dir %attr(0750,root,slocate) /var/lib/mlocate
%ghost /var/lib/mlocate/mlocate.db


%changelog
* Mon Sep 24 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.18-2mdv2008.0
+ Revision: 92526
- run updatedb with ionice -c0

* Sat Aug 25 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 0.18-1mdv2008.0
+ Revision: 71195
- spec file clean
- nuke rpath
- new version

* Thu May 03 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 0.17-1mdv2008.0
+ Revision: 21309
- Updated to 0.17.

* Fri Apr 20 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.16-1mdv2008.0
+ Revision: 16118
- new release


* Fri Nov 24 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.15-2mdv2007.0
+ Revision: 87061
- fix update (#27313)

* Thu Nov 23 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.15-1mdv2007.1
+ Revision: 86827
- Import mlocate

* Thu Nov 23 2006 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.15-1mdv2007.1
- new release

* Wed Sep 20 2006 Pixel <pixel@mandriva.com> 0.14-5mdv2007.0
- add explicit conflicts with slocate

* Sun Sep 17 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.14-4mdv2007.0
- don't upgrade from slocate (#25338)

* Wed Aug 09 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.14-3mdv2007.0
- revert 2mdk, readd trigger, needed for updates (#24220

* Sun Aug 06 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.14-2mdv2007.0
- remove uneeded trigger

* Sat Aug 05 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.14-1mdv2007.0
- initial release (with ideas from rh)