summaryrefslogtreecommitdiff
blob: fd2039d3088464119e4f6605542791a1aafb319b (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit bzr

EBZR_REVISION="1877"
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="amd64 x86"
IUSE=""

# note on dependencies
# joystick for inputattach (serial devices)
# run-mailcap for ltsp-remoteapps
# numlockx for X_NUMLOCK
DEPEND="x11-apps/xprop"
RDEPEND="!net-misc/ltsp-server
	media-sound/pulseaudio
	>=sys-fs/ltspfs-0.5.0
	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
	x11-misc/numlockx"

src_unpack() {
	bzr_src_unpack
}

src_prepare() {
	epatch "${FILESDIR}/${P}-ltsdownloadarch.patch"
}

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"

	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

	dodir /var/lib/ltsp-client-setup
	dodir /var/cache/ltsp
	dodir /var/cache/ltsp-localapps

	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/*

	insinto ${ltspdir}
	doins ltsp-common-functions
	doins client/ltsp_config
	doins client/screen-x-common
	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 /usr/share/ldm/rc.d
	doins localapps/ldm-rc.d/*

	newinitd client/initscripts/Gentoo/ltsp-client-setup.initd ltsp-client-setup
	newinitd client/initscripts/Gentoo/ltsp-client.initd ltsp-client
	newconfd client/initscripts/Gentoo/ltsp-client-setup.confd ltsp-client-setup

	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

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