summaryrefslogtreecommitdiff
blob: 7e1e2a2e77798df00ae655fff1ac5ea21e30909c (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
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

DESCRIPTION="LTSP client scripts"
HOMEPAGE="http://www.ltsp.org/"
SRC_URI="https://launchpad.net/ltsp/ltsp-trunk/${PV}/+download/ltsp-${PV}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
RESTRICT="mirror"
KEYWORDS="~amd64 ~x86"
IUSE=""

# note on dependencies
# run-mailcap for ltsp-remoteapps
# cron for crontabs and SHUTDOWN_TIME
# numlockx for X_NUMLOCK
# lsb-release for server ltsp-info
DEPEND="sys-devel/bison
	sys-devel/flex"
RDEPEND="app-admin/sysklogd
	app-misc/run-mailcap
	media-plugins/alsa-plugins
	media-sound/alsa-utils
	media-sound/pulseaudio
	net-analyzer/netcat
	net-ftp/tftp-hpa
	net-misc/ntp
	net-misc/openssh
	sys-apps/iproute2
	sys-apps/lsb-release
	sys-block/nbd
	>=sys-fs/ltspfs-1.1[client]
	>=sys-fs/sshfs-fuse-2.1
	virtual/cron
	x11-apps/xprop
	x11-apps/xrandr
	x11-misc/numlockx"
S=${WORKDIR}/ltsp


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

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

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

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

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

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

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

	# plugins and libraries
	insinto ${ltspdir}
	newins common/ltsp-common-functions ltsp-client-common-functions
	doins client/share/ltsp/ltsp-client-functions
	doins client/share/ltsp/ltsp_config
	doins client/share/ltsp/screen-x-common
	doins client/initscripts/ltsp-init-common
	newins server/Gentoo/share/ltsp/ltsp-server-vendor-functions ltsp-client-vendor-functions

	insinto ${ltspdir}/cleanup.d
	doins client/share/ltsp/cleanup.d/*

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

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

	insinto ${ldmdir}
	doins -r client/share/ldm/rc.d

	insinto ${ldmdir}/rc.d
	doins client/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/Gentoo/initscripts/ltsp-client.initd ltsp-client
	
	# udev
	exeinto /lib/udev
	doexe client/udev/ltsp-sound
	
	insinto /lib/udev/rules.d
	doins client/share/ltsp/udev/ltsp-sound.rules

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

	# default lts.conf
	insinto /etc
	doins server/configs/lts.conf
}