1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="Control Group manager daemon"
10 HOMEPAGE="https://linuxcontainers.org/cgmanager/introduction/"
11 SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
15 KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc64 ~x86"
18 RDEPEND="sys-libs/libnih[dbus]
20 selinux? ( sec-policy/selinux-cgmanager )"
26 # systemd expects files in /sbin but we will have them in /usr/sbin
27 pushd config/init/systemd > /dev/null || die
28 sed -i -e "s@sbin@usr/&@" {${PN},cgproxy}.service || \
29 die "Failed to fix paths in systemd service files"
30 popd > /dev/null || die
32 # there is an automagic dep on pam
33 epatch "${FILESDIR}/${PN}-0.39-make-pam-conditional.patch"
39 --with-distro=gentoo \
40 $(use_enable pam pam-module) \
41 --with-pamdir="$(getpam_mod_dir)" \
42 --with-init-script=systemd
48 # I see no reason to have the tests in the filesystem. Drop them
49 rm -r "${D}"/usr/share/${PN}/tests || die "Failed to remove ${PN} tests"
51 newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
52 newinitd "${FILESDIR}"/cgproxy.initd-r1 cgproxy