/[gentoo-x86]/sys-cluster/util-vserver/util-vserver-0.30.216_pre2910.ebuild
Gentoo

Contents of /sys-cluster/util-vserver/util-vserver-0.30.216_pre2910.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Nov 20 09:13:21 2011 UTC (3 years, 9 months ago) by xarthisius
Branch: MAIN
Changes since 1.3: +2 -2 lines
ppc keywords dropped wrt #364103

(Portage version: 2.2.0_alpha75/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/util-vserver/util-vserver-0.30.216_pre2910.ebuild,v 1.3 2011/03/07 21:18:19 jer Exp $
4
5 inherit eutils bash-completion
6
7 MY_P=${P/_/-}
8 S="${WORKDIR}"/${MY_P}
9
10 DESCRIPTION="Linux-VServer admin utilities"
11 HOMEPAGE="http://www.nongnu.org/util-vserver/"
12 SRC_URI="http://people.linux-vserver.org/~dhozac/t/uv-testing/${MY_P}.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 hppa ~sparc x86"
17
18 IUSE=""
19
20 CDEPEND="dev-libs/beecrypt
21 net-firewall/iptables
22 net-misc/vconfig
23 sys-apps/iproute2
24 || ( >=sys-apps/coreutils-6.10-r1 sys-apps/mktemp )"
25
26 DEPEND=">=dev-libs/dietlibc-0.30-r2
27 ${CDEPEND}"
28
29 RDEPEND="${CDEPEND}"
30
31 pkg_setup() {
32 if [[ -z "${VDIRBASE}" ]]; then
33 einfo
34 einfo "You can change the default vserver base directory (/vservers)"
35 einfo "by setting the VDIRBASE environment variable."
36 fi
37
38 : ${VDIRBASE:=/vservers}
39
40 einfo
41 einfo "Using \"${VDIRBASE}\" as vserver base directory"
42 einfo
43 }
44
45 src_compile() {
46 econf --with-vrootdir=${VDIRBASE} \
47 --with-initscripts=gentoo \
48 --localstatedir=/var || die "econf failed!"
49 emake || die "emake failed!"
50 }
51
52 src_install() {
53 make DESTDIR="${D}" install install-distribution \
54 || die "make install failed!"
55
56 # keep dirs
57 keepdir /var/run/vservers
58 keepdir /var/run/vservers.rev
59 keepdir /var/run/vshelper
60 keepdir /var/lock/vservers
61 keepdir /var/cache/vservers
62 keepdir "${VDIRBASE}"
63 keepdir "${VDIRBASE}"/.pkg
64
65 # remove legacy config file
66 rm -f "${D}"/etc/vservers.conf
67
68 # bash-completion
69 dobashcompletion "${FILESDIR}"/bash_completion util-vserver
70
71 dodoc README ChangeLog NEWS AUTHORS THANKS util-vserver.spec
72 }
73
74 pkg_preinst() {
75 has_version "<${CATEGORY}/${PN}-0.30.211"
76 old_init_script_warn=$?
77 }
78
79 pkg_postinst() {
80 # Create VDIRBASE in postinst, so it is (a) not unmerged and (b) also
81 # present when merging.
82
83 [ ! -d "${VDIRBASE}" ] && mkdir -p "${VDIRBASE}" &> /dev/null
84 setattr --barrier "${VDIRBASE}" &> /dev/null
85
86 rm /etc/vservers/.defaults/vdirbase
87 ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase
88
89 elog
90 elog "You have to run the vprocunhide command after every reboot"
91 elog "in order to setup /proc permissions correctly for vserver"
92 elog "use. An init script has been installed by this package."
93 elog "To use it you should add it to a runlevel:"
94 elog
95 elog " rc-update add vprocunhide default"
96 elog
97
98 if [[ $old_init_script_warn = 0 ]] ; then
99 ewarn "Please make sure, that you remove the old init-script from any"
100 ewarn "runlevel and remove it from your init.d dir!"
101 ewarn
102 ewarn "# rc-update del vservers"
103 ewarn "# rm -f ${ROOT}etc/init.d/vservers"
104 ewarn
105 ewarn "Since util-vserver-0.30.211 all Gentoo specific wrappers"
106 ewarn "have been merged upstream, and may now have a slightly"
107 ewarn "different syntax, i.e. you have to update scripts that"
108 ewarn "depend on these wrappers (vesync, vemerge, vupdateworld"
109 ewarn "and vdispatch-conf)"
110 ewarn
111 ewarn "Additionally the init scripts have changed and now use"
112 ewarn "upstream scripts as backend. An init script to start"
113 ewarn "virtual servers in the 'default' group/mark has been"
114 ewarn "installed by this ebuild:"
115 ewarn
116 ewarn " rc-update add vservers.default default"
117 ewarn
118 ewarn "To start vservers in other groups/marks, you have to"
119 ewarn "symlink the default init script the same way you do"
120 ewarn "with net.* scripts:"
121 ewarn
122 ewarn " ln -s /etc/init.d/vservers.default /etc/init.d/vservers.<mark>"
123 ewarn
124 fi
125 }

  ViewVC Help
Powered by ViewVC 1.1.20