summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Sanda <ps@twin.jikos.cz>2010-12-09 20:07:24 +0100
committerPavel Sanda <ps@twin.jikos.cz>2010-12-09 20:07:24 +0100
commita5057fe13e4af623d8c41d390bc6502a6d101731 (patch)
tree6fd13254a44f4743715a3cd5872b4acc6be52f25
parentbump 1.2 (diff)
downloadrebutia-a5057fe13e4af623d8c41d390bc6502a6d101731.tar.gz
rebutia-a5057fe13e4af623d8c41d390bc6502a6d101731.tar.bz2
rebutia-a5057fe13e4af623d8c41d390bc6502a6d101731.zip
Keep slocate
-rw-r--r--sys-apps/slocate/Manifest2
-rw-r--r--sys-apps/slocate/slocate-3.1-r2.ebuild88
2 files changed, 90 insertions, 0 deletions
diff --git a/sys-apps/slocate/Manifest b/sys-apps/slocate/Manifest
new file mode 100644
index 0000000..a65684a
--- /dev/null
+++ b/sys-apps/slocate/Manifest
@@ -0,0 +1,2 @@
+DIST slocate-3.1.tar.gz 37748 RMD160 d3b1e818cc35ce8e87ec1b0764f6b2145a319e13 SHA1 e427552664385b86931b7626c26bd95ae5f9f085 SHA256 6abec68ab50fa743739fb78a5063c295ae2f7d04d2e538f7c3108120e49a3266
+EBUILD slocate-3.1-r2.ebuild 2374 RMD160 ddb200b1240492657d57d5d622bdd2e2502c4f32 SHA1 391b77ceeb79c686dd7596f6dcaee3834082eb71 SHA256 3395ea5f81f1ea3934e00144d82ce1b0ca66790058c99f4a65e4da86d0b0d13e
diff --git a/sys-apps/slocate/slocate-3.1-r2.ebuild b/sys-apps/slocate/slocate-3.1-r2.ebuild
new file mode 100644
index 0000000..8c8b1e6
--- /dev/null
+++ b/sys-apps/slocate/slocate-3.1-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/slocate/slocate-3.1-r2.ebuild,v 1.2 2009/08/15 23:47:26 vapier Exp $
+
+inherit flag-o-matic eutils toolchain-funcs
+
+DESCRIPTION="Secure way to index and quickly search for files on your system (drop-in replacement for 'locate')"
+HOMEPAGE="http://slocate.trakker.ca/"
+SRC_URI="http://slocate.trakker.ca/files/${P}.tar.gz"
+
+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) ]] && [[ -z $(egetent group locate) ]] ; then
+ eerror "The 'slocate' group has been renamed to 'locate'."
+ eerror "You seem to already have a 'slocate' group."
+ eerror "Please rename it:"
+ eerror "groupmod -n locate slocate"
+ die "Change 'slocate' to 'locate'"
+ fi
+ enewgroup locate 245
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-incompat-warning.patch
+ epatch "${FILESDIR}"/${P}-CVE-2007-0227.patch
+ epatch "${FILESDIR}"/${P}-cron2.patch
+ epatch "${FILESDIR}"/${P}-NUL.patch #216838
+}
+
+src_compile() {
+ filter-lfs-flags
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ emake CC="$(tc-getCC)" -C src || die
+}
+
+src_install() {
+ dobin src/slocate || die
+ dodir /usr/bin
+ dosym slocate /usr/bin/locate
+ dosym slocate /usr/bin/updatedb
+
+ exeinto /etc/cron.daily
+ newexe debian/cron.daily slocate || die
+
+ doman doc/*.1
+ dosym slocate.1 /usr/share/man/man1/locate.1
+
+ keepdir /var/lib/slocate
+
+ dodoc Changelog README WISHLIST notes
+
+ insinto /etc
+ doins "${FILESDIR}"/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_preinst() {
+ if has_version '=sys-apps/slocate-2*' ; then
+ rm -f "${ROOT}"/var/lib/slocate/slocate.db
+ ewarn "The slocate database created by slocate-2.x is incompatible"
+ ewarn "with slocate-3.x. Make sure you run updatedb!"
+ fi
+}
+
+pkg_postinst() {
+ 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
+}