diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-31 22:47:50 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-31 22:47:50 +0000 |
commit | 232b1ba528fd7049ed49f0de38abd2a00b7203ae (patch) | |
tree | a0cc2962f7326b4714f248c1155012fe53d239a1 /sys-apps/slocate | |
parent | use the locate group instead of rlocate (diff) | |
download | gentoo-2-232b1ba528fd7049ed49f0de38abd2a00b7203ae.tar.gz gentoo-2-232b1ba528fd7049ed49f0de38abd2a00b7203ae.tar.bz2 gentoo-2-232b1ba528fd7049ed49f0de38abd2a00b7203ae.zip |
Use a common "locate" group instead of "slocate" to work with rlocate.
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-apps/slocate')
-rw-r--r-- | sys-apps/slocate/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/slocate/files/digest-slocate-2.7-r8 | 3 | ||||
-rw-r--r-- | sys-apps/slocate/slocate-2.7-r8.ebuild | 96 |
3 files changed, 106 insertions, 2 deletions
diff --git a/sys-apps/slocate/ChangeLog b/sys-apps/slocate/ChangeLog index 600db3793769..122660ae9041 100644 --- a/sys-apps/slocate/ChangeLog +++ b/sys-apps/slocate/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/slocate -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/ChangeLog,v 1.52 2004/10/20 16:55:35 swegener Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/ChangeLog,v 1.53 2005/05/31 22:47:50 vapier Exp $ + +*slocate-2.7-r8 (31 May 2005) + + 31 May 2005; Mike Frysinger <vapier@gentoo.org> +slocate-2.7-r8.ebuild: + Use a common "locate" group instead of "slocate" to work with rlocate. *slocate-2.7-r7 (20 Oct 2004) diff --git a/sys-apps/slocate/files/digest-slocate-2.7-r8 b/sys-apps/slocate/files/digest-slocate-2.7-r8 new file mode 100644 index 000000000000..18a27a0ba74b --- /dev/null +++ b/sys-apps/slocate/files/digest-slocate-2.7-r8 @@ -0,0 +1,3 @@ +MD5 4872830642ea2ed5f9aff932720583c9 slocate-2.7.tar.gz 87240 +MD5 464b97b8b69561dd52b136ffb12865ec slocate-2.7-debian.patch.bz2 2623 +MD5 8f236aa960216f59aaa53a70a76a6db3 slocate-2.7-uclibc-sl_fts.patch.bz2 7566 diff --git a/sys-apps/slocate/slocate-2.7-r8.ebuild b/sys-apps/slocate/slocate-2.7-r8.ebuild new file mode 100644 index 000000000000..c2a5f011fbfe --- /dev/null +++ b/sys-apps/slocate/slocate-2.7-r8.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/slocate-2.7-r8.ebuild,v 1.1 2005/05/31 22:47:50 vapier Exp $ + +inherit flag-o-matic eutils + +DESCRIPTION="Secure way to index and quickly search for files on your system (drop-in replacement for 'locate')" +HOMEPAGE="http://www.geekreview.org/slocate/" +SRC_URI="ftp://ftp.geekreview.org/slocate/src/slocate-${PV}.tar.gz + mirror://gentoo/${P}-debian.patch.bz2 + elibc_uclibc? ( mirror://gentoo/${P}-uclibc-sl_fts.patch.bz2 )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="sys-apps/shadow" +RDEPEND="${DEPEND} + !sys-apps/rlocate" + +pkg_setup() { + if [[ -n $(egetent group slocate) ]] ; then + eerror "The 'slocate' group has been renamed to 'locate'." + eerror "You seem to already have a 'slocate' group." + eerror "Please rename it:" + eerror "sed -i s/^slocate:/locate:/ /etc/group" + die "Change 'slocate' to 'locate'" + fi + enewgroup locate +} + +src_unpack() { + unpack ${A} + cd "${S}" + use elibc_uclibc && epatch "${WORKDIR}"/${P}-uclibc-sl_fts.patch + epatch "${WORKDIR}"/${P}-debian.patch + epatch "${FILESDIR}"/${P}-bounds.patch + + sed -i \ + -e '/SLOC_GRP/s:slocate:locate:' \ + main.c || die "sed group" + + filter-lfs-flags + # this is safe since slocate only has 1 binary + append-ldflags -Wl,-z,now + + sed -i \ + -e "/groupadd/s/^/#/" \ + -e "/chown.*slocate/s/^/#/" \ + -e '/^CFLAGS/d' \ + Makefile.in || die +} + +src_install() { + dodir /usr/share/man/man1 + make DESTDIR="${D}" install || die "make install failed" + + # make install for this package is blocked by sandbox + dosym slocate /usr/bin/locate + dosym slocate /usr/bin/updatedb + fperms 0755 /etc/cron.daily/slocate + keepdir /var/lib/slocate + + # #37871: nice updatedb + dosed 's,^\([[:space:]]*\)\(/usr/bin/updatedb\),\1nice \2,' /etc/cron.daily/slocate + + dodoc AUTHORS README ChangeLog + + # man page fixing + rm -f "${D}"/usr/share/man/man1/locate.1.gz + dosym slocate.1.gz /usr/share/man/man1/locate.1.gz + + insinto /etc + doins "${FILESDIR}/updatedb.conf" + fperms 0644 /etc/updatedb.conf + + fowners root:locate /usr/bin/slocate + fperms go-r,g+s /usr/bin/slocate + + chown -R root:locate "${D}/var/lib/slocate" + fperms 0750 /var/lib/slocate +} + +pkg_postinst() { + touch "${ROOT}/var/lib/slocate/slocate.db" + + if [[ -f ${ROOT}/etc/cron.daily/slocate.cron ]]; then + ewarn "If you merged slocate-2.7.ebuild, please remove" + ewarn "/etc/cron.daily/slocate.cron since .cron has been removed" + ewarn "from the filename" + echo + fi + einfo "Note that the /etc/updatedb.conf file is generic" + einfo "Please customize it to your system requirements" +} |