summaryrefslogtreecommitdiff
path: root/app-misc/sabayon-mce/sabayon-mce-1.1-r1.ebuild
blob: 885bdad853e769ecbf381434226953ea0ffc981b (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
52
53
54
55
56
# Copyright 2004-2012 Sabayon
# Distributed under the terms of the GNU General Public License v2

inherit eutils

DESCRIPTION="Sabayon Linux Media Center Infrastructure"
HOMEPAGE="http://www.sabayon.org/"
SRC_URI=""

RESTRICT="nomirror"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm x86"
IUSE=""

RDEPEND="media-tv/xbmc
	>=app-misc/rogentoslive-tools-1.0"
DEPEND=""

S="${WORKDIR}"

src_unpack() {
	cp "${FILESDIR}"/${PV}/* "${WORKDIR}"/ -Rp || die "cannot unpack"
}

src_install () {

	cd "${WORKDIR}"/init.d
	newinitd sabayon-mce sabayon-mce

	cd "${WORKDIR}"/bin
	exeinto /usr/bin
	doexe *

	cd "${WORKDIR}"/xsession
	dodir /usr/share/xsessions
	insinto /usr/share/xsessions
	doins *.desktop

}

pkg_postinst() {
	# create new user sabayonmce
	local mygroups="users"
	for mygroup in lp wheel uucp audio cdrom scanner video cdrw usb plugdev polkituser; do
		if [[ -n $(egetent group "${mygroup}") ]]; then
        		mygroups+=",${mygroup}"
		fi
	done
	enewuser sabayonmce -1 /bin/sh /var/sabayonmce "${mygroups}"

	elog "For those who are using <=Sabayon-5.1 as Media Center:"
	elog "PLEASE update DISPLAYMANAGER= in /etc/conf.d/xdm"
	elog "setting it to gdm or kdm."

}