15b6f6e
Summary: An utility for finding files by name
15b6f6e
Name: mlocate
d9ffb89
Version: 0.22
1ff0d42
Release: 3
15b6f6e
License: GPLv2
a944ff1
URL: https://fedorahosted.org/mlocate/
15b6f6e
Group: Applications/System
d9ffb89
Source0: https://fedorahosted.org/releases/m/l/mlocate/mlocate-%{version}.tar.bz2
15b6f6e
Source1: updatedb.conf
15b6f6e
Source2: mlocate.cron
15b6f6e
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
eee1b3a
Requires(pre): shadow-utils
eee1b3a
Requires(triggerpostun): shadow-utils
4836bec
Requires(post): grep, sed
15b6f6e
Obsoletes: slocate <= 2.7-30
15b6f6e
Provides: slocate
15b6f6e
15b6f6e
%description
15b6f6e
mlocate is a locate/updatedb implementation.  It keeps a database of
15b6f6e
all existing files and allows you to lookup files by name.
15b6f6e
15b6f6e
The 'm' stands for "merging": updatedb reuses the existing database to avoid
15b6f6e
rereading most of the file system, which makes updatedb faster and does not
15b6f6e
trash the system caches as much as traditional locate implementations.
15b6f6e
15b6f6e
%prep
15b6f6e
%setup -q
15b6f6e
15b6f6e
%build
e383274
%configure --localstatedir=%{_localstatedir}/lib
e383274
make %{?_smp_mflags} groupname=slocate
15b6f6e
15b6f6e
%install
15b6f6e
rm -rf $RPM_BUILD_ROOT
e383274
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' groupname=slocate
15b6f6e
15b6f6e
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.daily}
e383274
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/updatedb.conf
e383274
install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/mlocate.cron
d9ffb89
# %%ghost semantics is so stupid
e383274
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/mlocate/mlocate.db
15b6f6e
15b6f6e
%find_lang mlocate
15b6f6e
15b6f6e
%clean
15b6f6e
rm -rf $RPM_BUILD_ROOT
15b6f6e
15b6f6e
%pre
e383274
getent group slocate >/dev/null || groupadd -g 21 -r -f slocate
e383274
exit 0
15b6f6e
4836bec
%post
4836bec
if /bin/grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then
4836bec
    /bin/sed -i.rpmsave -e '/DAILY_UPDATE/s/^/#/' %{_sysconfdir}/updatedb.conf
4836bec
fi
4836bec
15b6f6e
%triggerpostun -- slocate <= 2.7-30
e383274
getent group slocate >/dev/null || groupadd -g 21 -r -f slocate
e383274
exit 0
15b6f6e
15b6f6e
%files -f mlocate.lang
15b6f6e
%defattr(-,root,root,-)
3ab3d9a
%doc AUTHORS COPYING NEWS README
15b6f6e
/etc/cron.daily/mlocate.cron
15b6f6e
%config(noreplace) %{_sysconfdir}/updatedb.conf
15b6f6e
%attr(2711,root,slocate) %{_bindir}/locate
15b6f6e
%{_bindir}/updatedb
15b6f6e
%{_mandir}/man*/*
e383274
%dir %attr(0750,root,slocate) %{_localstatedir}/lib/mlocate
e383274
%ghost %{_localstatedir}/lib/mlocate/mlocate.db
15b6f6e
15b6f6e
%changelog
1ff0d42
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-3
1ff0d42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
1ff0d42
4fd714e
* Tue May 19 2009 Miloslav Trmač <mitr@redhat.com> - 0.22-2
4fd714e
- Add /var/cache/ccache to PRUNEPATHS.
4fd714e
d9ffb89
* Tue Apr 14 2009 Miloslav Trmač <mitr@redhat.com> - 0.22-1
d9ffb89
- Update to mlocate-0.22
d9ffb89
2a9a6dc
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.1-4
2a9a6dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2a9a6dc
e383274
* Mon Jan 12 2009 Miloslav Trmač <mitr@redhat.com> - 0.21.1-3
e383274
- Merge review fixes, based on a patch by Parag AN:
e383274
  - Use %%{_localstatedir}/lib instead of hard-coding /var/lib
e383274
  - Use %%{?_smp_mflags}
e383274
  - Preserve file time stamps
e383274
  - Only create the group if it doesn't exist, hide errors from rpm
e383274
eee1b3a
* Fri Nov 28 2008 Miloslav Trmač <mitr@redhat.com> - 0.21.1-2
eee1b3a
- Add .git to PRUNENAMES
eee1b3a
  Resolves: #473227
eee1b3a
- Avoid a rpmlint warning
eee1b3a
e059173
* Tue Oct 28 2008 Miloslav Trmač <mitr@redhat.com> - 0.21.1-1
e059173
- Update to mlocate-0.21
e059173
  Resolves: #461208
e059173
8fe69af
* Mon Jun 30 2008 Miloslav Trmač <mitr@redhat.com> - 0.21-1
8fe69af
- Update to mlocate-0.21
8fe69af
- Define PRUNENAMES to exclude .svn and .hg
8fe69af
55d5e87
* Wed Apr  9 2008 Miloslav Trmač <mitr@redhat.com> - 0.20-1
55d5e87
- Update to mlocate-0.20
55d5e87
a944ff1
* Mon Mar  3 2008 Miloslav Trmač <mitr@redhat.com> - 0.19-1
a944ff1
- Update to mlocate-0.19
a944ff1
- New home page at https://fedorahosted.org/mlocate/ .
a944ff1
9eb0713
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.18-2
9eb0713
- Autorebuild for GCC 4.3
9eb0713
5aabb41
* Sat Aug 25 2007 Miloslav Trmač <mitr@redhat.com> - 0.18-1
5aabb41
- Update to mlocate-0.18
5aabb41
- Run updatedb with reduced I/O priority
5aabb41
  Resolves: #254165
5aabb41
a8b8ac6
* Wed Apr 25 2007 Miloslav Trmac <mitr@redhat.com> - 0.17-1
a8b8ac6
- Update to mlocate-0.17
a8b8ac6
  Resolves: #237120
a8b8ac6
9111b4f
* Tue Mar  6 2007 Miloslav Trmac <mitr@redhat.com> - 0.16-1
9111b4f
- Update to mlocate-0.16
9111b4f
- Enable PRUNE_BIND_MOUNTS by default
9111b4f
  Resolves: #221755
9111b4f
5e6c8ee
* Fri Jan  5 2007 Miloslav Trmac <mitr@redhat.com> - 0.15-2
5e6c8ee
- Add gfs and gfs2 to PRUNEFS
5e6c8ee
  Resolves: #220491
5e6c8ee
3fa4349
* Thu Nov 16 2006 Miloslav Trmac <mitr@redhat.com> - 0.15-1
3fa4349
- Update to mlocate-0.15
3fa4349
  Resolves: #215763
3fa4349
8e8ea18
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.14-2.1
8e8ea18
- rebuild
8e8ea18
3ab3d9a
* Sat Mar 18 2006 Miloslav Trmac <mitr@redhat.com> - 0.14-2
3ab3d9a
- Ship NEWS
3ab3d9a
77cf3ad
* Sat Mar 18 2006 Miloslav Trmac <mitr@redhat.com> - 0.14-1
77cf3ad
- Update to mlocate-0.14
77cf3ad
9de07bf
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.12-1.2
9de07bf
- bump again for double-long bug on ppc(64)
9de07bf
76c163e
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.12-1.1
76c163e
- rebuilt for new gcc4.1 snapshot and glibc changes
76c163e
1a4674d
* Sat Dec 31 2005 Miloslav Trmac <mitr@redhat.com> - 0.12-1
1a4674d
- Update to mlocate-0.12
1a4674d
4a629ba
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
4a629ba
- rebuilt
4a629ba
4836bec
* Fri Dec  2 2005 Miloslav Trmac <mitr@redhat.com> - 0.11-2
4836bec
- Comment out DAILY_UPDATE from updatedb.conf (#174693)
4836bec
15b6f6e
* Thu Nov 10 2005 Miloslav Trmac <mitr@redhat.com> - 0.11-1
15b6f6e
- Update to mlocate-0.11
15b6f6e
- Add scriptlets to create group slocate
15b6f6e
15b6f6e
* Thu Jul 28 2005 Miloslav Trmac <mitr@volny.cz> - 0.10-0.testing.1
15b6f6e
- Update to mlocate-0.10
15b6f6e
15b6f6e
* Thu Jul 28 2005 Miloslav Trmac <mitr@volny.cz> - 0.09-0.testing.1
15b6f6e
- Initial build.