*/*: Bump copyright on files touched this year
[gentoo.git] / app-admin / cgmanager / cgmanager-0.42.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools pam
7
8 DESCRIPTION="Control Group manager daemon"
9 HOMEPAGE="https://linuxcontainers.org/cgmanager/introduction/"
10 SRC_URI="https://linuxcontainers.org/downloads/${PN}/${P}.tar.gz"
11
12 LICENSE="LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
15 IUSE="pam selinux"
16
17 RDEPEND="sys-libs/libnih[dbus]
18         sys-apps/dbus
19         selinux? ( sec-policy/selinux-cgmanager )"
20 DEPEND="${RDEPEND}"
21
22 src_prepare() {
23         eapply_user
24
25         # systemd expects files in /sbin but we will have them in /usr/sbin
26         pushd config/init/systemd > /dev/null || die
27         sed -i -e "s@sbin@usr/&@" {${PN},cgproxy}.service || \
28                 die "Failed to fix paths in systemd service files"
29         popd > /dev/null || die
30
31         eautoreconf
32 }
33
34 src_configure() {
35         econf \
36                 --with-distro=gentoo \
37                 --with-pamdir="$(usex pam $(getpam_mod_dir) none)" \
38                 --with-init-script=systemd
39 }
40
41 src_install () {
42         default
43
44         # I see no reason to have the tests in the filesystem. Drop them
45         rm -r "${D}"/usr/share/${PN}/tests || die "Failed to remove ${PN} tests"
46
47         newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
48         newinitd "${FILESDIR}"/cgproxy.initd-r1 cgproxy
49 }