summaryrefslogtreecommitdiff
blob: fdbcbfdc7275578da31701ebfe3eef95e0d3d008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/rlocate/rlocate-0.3.0.ebuild,v 1.4 2005/06/08 02:47:53 vapier Exp $

inherit eutils toolchain-funcs

DESCRIPTION="locate implementation that is always up-to-date"
HOMEPAGE="http://rlocate.sourceforge.net/"
SRC_URI="mirror://sourceforge/rlocate/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="virtual/kernel"
RDEPEND="!sys-apps/slocate"

pkg_setup() {
	enewgroup locate
}

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i \
		-e '/^RLOCATE_GRP/s:=.*:=locate:' \
		Makefile.in || die "sed group"
	rm -f rlocate-scripts/Makefile
	sed -i \
		-e '/groupadd/d' \
		-e '/chown/s/root:$(rlocate)/root:locate/g' \
		Makefile.in rlocate-scripts/Makefile.in
	sed -i \
		-e '/DRLOCATE_GRP/s:$(rlocate):locate:' \
		rlocate-daemon/Makefile.in
}

src_compile() {
	econf --enable-sandboxed || die
	ARCH=$(tc-arch-kernel) emake || die
}

src_install() {
	make install DESTDIR="${D}" || die
	dodoc AUTHORS ChangeLog* NEWS README
}