summaryrefslogtreecommitdiff
blob: bba41e94e92f9511339fbb28d55536facad91616 (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
46
47
48
49
50
51
# 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="basic? ( http://0pointer.de/public/systemd-units/sshd.service
	http://0pointer.de/public/systemd-units/sshd.socket
	http://0pointer.de/public/systemd-units/sshd@.service )"

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

RDEPEND=""
DEPEND=""

src_prepare() {
	if use basic; then
		cp "${DISTDIR}/sshd.service"  . || die
		cp "${DISTDIR}/sshd.socket"   . || die
		cp "${DISTDIR}/sshd@.service" . || die
		epatch "${FILESDIR}"/sshd_at.patch || die
	fi
}

src_install() {
	if use basic; then
		systemd_dounit "${FILESDIR}"/services-basic/*
		systemd_dounit "sshd.service"
		systemd_dounit "sshd.socket"
		systemd_dounit "sshd@.service"
	fi

	if use server; then
		systemd_dounit "${FILESDIR}"/services-server/*
		systemd_dotmpfilesd "${FILESDIR}"/tmpfiles-server/*
	fi

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

		if ! use ingnome3; then
			rm -f "${D}/$(systemd_get_unitdir)"/gdm@.service
		fi
	fi
}