diff app-admin/jailkit/jailkit-2.11.ebuild @ 218:b7f1409d82f3

add jailkit ebuild
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sat, 26 Jun 2010 02:15:31 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app-admin/jailkit/jailkit-2.11.ebuild	Sat Jun 26 02:15:31 2010 +0200
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit autotools eutils
+
+DESCRIPTION="Allows you to easily put programs and users in a chrooted environment"
+HOMEPAGE="http://olivier.sessink.nl/jailkit/"
+SRC_URI="http://olivier.sessink.nl/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}/${P}-ldflags.patch" \
+		"${FILESDIR}/${P}-pyc.patch" \
+		"${FILESDIR}/${P}-noshells.patch"
+	eautoreconf
+}
+
+src_install() {
+	emake DESTDIR="${D}" install || die "emake install failed"
+	doinitd "${FILESDIR}/jailkit" ||  die "doinit install failed"
+}
+
+pkg_postinst() {
+	ebegin "Updating /etc/shells"
+	{ grep -v "^/usr/sbin/jk_chrootsh$" "${ROOT}"etc/shells; echo "/usr/sbin/jk_chrootsh"; } > "${T}"/shells
+	mv -f "${T}"/shells "${ROOT}"etc/shells
+	eend $?
+}