/[gentoo-x86]/app-misc/jail/jail-2.0.ebuild
Gentoo

Contents of /app-misc/jail/jail-2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri Aug 8 21:35:19 2014 UTC (6 years, 3 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
Stable for ppc, wrt bug #514892

(Portage version: 2.2.8-r1/cvs/Linux x86_64, RepoMan options: --include-arches="ppc", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-misc/jail/jail-2.0.ebuild,v 1.3 2014/07/12 10:55:32 ago Exp $
4
5 EAPI="5"
6
7 inherit eutils flag-o-matic
8
9 DESCRIPTION="a tool that builds a chroot and configures all the required files, directories and libraries"
10 HOMEPAGE="https://github.com/spiculator/jail"
11 SRC_URI="https://github.com/spiculator/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 ppc x86"
16 IUSE=""
17
18 DEPEND=">=sys-apps/sed-4"
19 RDEPEND="dev-lang/perl
20 dev-util/strace"
21
22 src_prepare() {
23 epatch \
24 "${FILESDIR}"/${PN}-1.9-gentoo.patch \
25 "${FILESDIR}"/${PN}-1.9-wrongshell.patch \
26 "${FILESDIR}"/${PN}-1.9-multiuser-rsa.patch \
27 "${FILESDIR}"/${PN}-1.9-ldflags.patch
28 }
29
30 src_compile() {
31 # configuration files should be installed in /etc not /usr/etc
32 sed -i "s:\$4/etc:\${D}/etc:g" install.sh || die
33
34 # the destination directory should be /usr not /usr/local
35 sed -i -e "s:usr/local:${D}/usr:g" \
36 -e "s:^COPT =.*:COPT = -Wl,-z,no:g" src/Makefile || die
37
38 # Below didn't work. Don't know why
39 #append-ldflags -Wl,-z,now
40 emake -C src CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
41 }
42
43 src_install() {
44 emake -C src install
45
46 # remove //var/tmp/portage/${P}/image//usr from files
47 FILES=( "${D}/usr/bin/mkjailenv"
48 "${D}/usr/bin/addjailsw"
49 "${D}/usr/bin/addjailuser"
50 "${D}/etc/jail.conf"
51 "${D}/usr/lib/libjail.pm"
52 "${D}/usr/lib/arch/generic/definitions"
53 "${D}/usr/lib/arch/generic/functions"
54 "${D}/usr/lib/arch/linux/definitions"
55 "${D}/usr/lib/arch/linux/functions"
56 "${D}/usr/lib/arch/freebsd/definitions"
57 "${D}/usr/lib/arch/freebsd/functions"
58 "${D}/usr/lib/arch/irix/definitions"
59 "${D}/usr/lib/arch/irix/functions"
60 "${D}/usr/lib/arch/solaris/definitions"
61 "${D}/usr/lib/arch/solaris/functions" )
62
63 for f in "${FILES[@]}"; do
64 sed -i "s:/${D}/usr:/usr:g" ${f} || die
65 done
66
67 sed -i "s:/usr/etc:/etc:" "${D}"/usr/lib/libjail.pm || die
68
69 dodoc doc/{CHANGELOG,INSTALL,README,SECURITY,VERSION}
70 }

  ViewVC Help
Powered by ViewVC 1.1.20