summaryrefslogtreecommitdiff
blob: 9487fe6cb4b711935f89a6b3dfa788e5ec019900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3
inherit eutils systemd

DESCRIPTION="Service files for sys-apps/systemd"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd http://en.gentoo-wiki.com/wiki/Systemd"
SRC_URI=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+desktop server"

RDEPEND=""
DEPEND=""

src_install() {
	if use server; then
		systemd_dounit "${FILESDIR}"/services-server/*
		systemd_dotmpfilesd "${FILESDIR}"/tmpfiles-server/*
		(
			insinto /etc/kernel/postinst.d/
			doins "${FILESDIR}"/90_kexec
		)
	fi

	if use desktop; then
		systemd_dounit "${FILESDIR}"/services-desktop/*
	fi

	# Files in portage cannot contain a literal '@' character. Therfore,
	# convert the code string "_at" into an '@' before installing.
	rename '_at' '@' "${D}/$(systemd_get_unitdir)"/*
}

pkg_postinst() {
	if use server; then
		elog "The file '${ROOT}etc/kernel/postinst.d/90_kexec' has been"
		elog "installed for you. If you use kexec, you may want to enable it by"
		elog "making it exectuable."
	fi
}