summaryrefslogtreecommitdiff
blob: 2fcc52d442ffae05d2c283eeed3ff0ee649d94e2 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit bzr

EBZR_REVISION="2114"
EBZR_REPO_URI="http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk"
DESCRIPTION="LTSP client scripts"
HOMEPAGE="http://www.ltsp.org/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

# note on dependencies
# joystick for inputattach (serial devices)
# run-mailcap for ltsp-remoteapps
# cron for crontabs and SHUTDOWN_TIME
DEPEND="x11-apps/xprop"
RDEPEND="!net-misc/ltsp-server
	media-sound/pulseaudio
	>=sys-fs/ltspfs-1.1
	net-analyzer/netcat
	net-misc/openssh
	sys-block/nbd
	sys-apps/lsb-release
	net-ftp/tftp-hpa
	>=sys-fs/sshfs-fuse-2.1
	sys-apps/iproute2
	games-util/joystick
	media-sound/alsa-utils
	media-plugins/alsa-plugins
	app-misc/run-mailcap
	net-misc/ntp
	app-admin/sysklogd
	sys-process/vixie-cron"

src_unpack() {
	bzr_src_unpack
}

src_compile() {
	pushd client/getltscfg
	emake || or die "Could not make getltspcfg"
	popd

	pushd localapps
	./autogen.sh || or die "Could not generate configure for xatomwait"
	econf || or die "Could not configure xatomwait"
	emake || or die "Could not make xatomwait"
	popd
}

src_install() {
	ltspdir="/usr/share/ltsp"

	# executables
	dobin client/getltscfg/getltscfg
	dosbin client/jetpipe/jetpipe

	dobin localapps/ltsp-localappsd
	dobin localapps/ltsp-genmenu
	dobin localapps/ltsp-remoteapps
	dobin localapps/ltsp-remoteappsd
	dobin localapps/ltsp-open
	dobin localapps/src/xatomwait

	exeinto ${ltspdir}
	doexe client/configure-x.sh
	doexe client/screen_session
	doexe client/update-kernels
	doexe client/xinitrc

	exeinto ${ltspdir}/screen.d
	doexe client/screen.d/*
	
	exeinto /sbin
	doexe client/init-ltsp

	# plugins
	insinto ${ltspdir}
	doins ltsp-common-functions
	doins client/ltsp_config
	doins client/screen-x-common
	doins client/kioskSession
	doins client/initscripts/ltsp-init-common

	insinto ${ltspdir}/xinitrc.d
	doins client/xinitrc.d/*

	insinto ${ltspdir}/screen-session.d
	doins client/screen-session.d/*
	
	insinto ${ltspdir}/ltsp_config.d
	doins client/ltsp_config.d/*	
	
	insinto ${ltspdir}/init-ltsp.d
	doins -r client/init-ltsp.d/*

	insinto /usr/share/ldm/rc.d
	doins localapps/ldm-rc.d/*
	
	# directories
	dodir /var/lib/ltsp-client-setup
	dodir /var/cache/ltsp
	dodir /var/cache/ltsp-localapps
	
	# init rc script
	newinitd client/initscripts/Gentoo/ltsp-client.initd ltsp-client
	
	# udev
	exeinto /lib/udev
	doexe client/udev/ltsp-sound
	
	insinto /etc/udev/rules.d
	doins client/udev/88-ltsp-sound.rules

	# man pages
	doman client/jetpipe/jetpipe.8
	doman client/getltscfg/getltscfg.1
	doman localapps/doc/xatomwait.1
	doman localapps/doc/ltsp-localappsd.1
	doman localapps/doc/ltsp-genmenu.1
	doman localapps/doc/ltsp-remoteapps.1

	# default lts.conf
	cp "${FILESDIR}/lts.conf" "${D}/etc/lts.conf"
}