/[gentoo-x86]/net-misc/ltsp/ltsp-3.0.9-r3.ebuild
Gentoo

Contents of /net-misc/ltsp/ltsp-3.0.9-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Nov 11 21:52:53 2004 UTC (14 years, 10 months ago) by lanius
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
remove old ebuilds

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/ltsp/ltsp-3.0.9-r3.ebuild,v 1.1 2004/09/25 07:53:51 lanius Exp $
4
5
6 IUSE="gnome kde"
7
8 DESCRIPTION="LTSP - Linux Terminal Server Project"
9 HOMEPAGE="http://www.ltsp.org/"
10 SRC_URI="mirror://sourceforge/ltsp/ltsp_core-3.0.9-i386.tgz
11 mirror://sourceforge/ltsp/ltsp_kernel-3.0.10-i386.tgz
12 mirror://sourceforge/ltsp/ltsp_x_core-3.0.4-i386.tgz
13 mirror://sourceforge/ltsp/ltsp_x_fonts-3.0.0-i386.tgz
14 mirror://sourceforge/ltsp/ltsp_x336_3dlabs-3.0.0-i386.tgz
15 mirror://sourceforge/ltsp/ltsp_x336_8514-3.0.0-i386.tgz
16 mirror://sourceforge/ltsp/ltsp_x336_agx-3.0.0-i386.tgz
17 mirror://sourceforge/ltsp/ltsp_x336_fbdev-3.0.0-i386.tgz
18 mirror://sourceforge/ltsp/ltsp_x336_i128-3.0.0-i386.tgz
19 mirror://sourceforge/ltsp/ltsp_x336_mach32-3.0.0-i386.tgz
20 mirror://sourceforge/ltsp/ltsp_x336_mach64-3.0.0-i386.tgz
21 mirror://sourceforge/ltsp/ltsp_x336_mach8-3.0.0-i386.tgz
22 mirror://sourceforge/ltsp/ltsp_x336_mono-3.0.0-i386.tgz
23 mirror://sourceforge/ltsp/ltsp_x336_p9000-3.0.0-i386.tgz
24 mirror://sourceforge/ltsp/ltsp_x336_s3-3.0.0-i386.tgz
25 mirror://sourceforge/ltsp/ltsp_x336_s3v-3.0.0-i386.tgz
26 mirror://sourceforge/ltsp/ltsp_x336_svga-3.0.0-i386.tgz
27 mirror://sourceforge/ltsp/ltsp_x336_vga16-3.0.0-i386.tgz
28 mirror://sourceforge/ltsp/ltsp_x336_w32-3.0.0-i386.tgz"
29
30 DEPEND="gnome? ( >=gnome-base/gdm-2.4.0.0 )
31 kde? ( >=kde-base/kdebase-3.0.2 )
32 virtual/x11
33 virtual/tftp
34 sys-apps/xinetd
35 net-misc/dhcp
36 net-fs/nfs-utils"
37
38 SLOT="0"
39 LICENSE="GPL-2"
40 KEYWORDS="x86"
41
42 ltsp_strip_config() {
43 local SOURCE="/"$1
44 local TARGET=${D}/$SOURCE
45 sed -e "/## LTS-begin ##/,/## LTS-end ##/d" < ${SOURCE} >> ${TARGET}
46 }
47
48 ltsp_copy_config() {
49 local SOURCE="/"$1
50 local TARGET=${D}/$SOURCE
51 if test -f $SOURCE ; then
52 cp $SOURCE $TARGET
53 else
54 echo "!!! No config file named $SOURCE"
55 return 1
56 fi
57 }
58
59 modify_exports()
60 {
61 echo ">>> Modifying /etc/exports ..."
62
63 # get the file
64 ltsp_strip_config /etc/exports
65
66 # insert new data
67 cat >> ${D}/etc/exports <<EOF
68
69 ## LTS-begin ##
70
71 #
72 # The lines between the 'LTS-begin' and the 'LTS-end' were added
73 # on: `date` by the ltsp installation script.
74 # For more information, visit the ltsp homepage
75 # at http://www.ltsp.org
76 #
77
78 /opt/ltsp/i386 192.168.0.0/255.255.255.0(ro,no_root_squash)
79 /var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0(rw,no_root_squash)
80
81 #
82 # The following entries need to be uncommented if you want
83 # Local App support in ltsp
84 #
85 #/home 192.168.0.0/255.255.255.0(rw,no_root_squash)
86
87 ## LTS-end ##
88 EOF
89
90 }
91
92 modify_xdm_xdm_config()
93 {
94 local file=/etc/X11/xdm/xdm-config
95
96 if [ -f $file ] ; then
97 echo ">>> Modifying $file ..."
98
99 # get file
100 ltsp_strip_config $file
101
102 # make temp file
103 mv ${D}$file ${D}$file.temp
104
105 cat >> ${D}$file.temp <<EOF
106
107 ## LTS-begin ##
108
109 #
110 # The lines between the 'LTS-begin' and the 'LTS-end' were added
111 # on: Mon Jan 21 21:40:50 CST 2002 by the ltsp installation script.
112 # For more information, visit the ltsp homepage
113 # at http://www.ltsp.org
114 #
115
116 DisplayManager.*.setup: /etc/X11/xdm/Xsetup_workstation
117
118 ## LTS-end ##
119 EOF
120
121 # comment out display port line
122 sed -e "s/^DisplayManager\.requestPort/\# DisplayManager.requestPort/" \
123 < ${D}$file.temp >> ${D}$file
124
125 # remove temp file
126 rm -f ${D}$file.temp
127 else
128 echo "!!! $file not installed on system"
129 fi
130 }
131
132 modify_xdm_Xservers()
133 {
134 local file=/etc/X11/xdm/Xservers
135
136 if [ -f $file ] ; then
137 echo ">>> Modifying $file ..."
138
139 # get file
140 ltsp_strip_config $file
141
142 # TODO: put this comment in a more sensical place!!
143 cat >> ${D}$file <<EOF
144
145 ## LTS-begin ##
146
147 # Comment the above line in order to disable xdm for the local machine!
148
149 ## LTS-end ##
150 EOF
151 else
152 echo "!!! $file not installed on system"
153 fi
154 }
155
156 modify_xdm_kdmrc()
157 {
158 local file=/usr/kde/3/share/config/kdm/kdmrc
159
160 if [ -f $file ] ; then
161 echo ">>> Modifying $file ..."
162
163 # get file
164 ltsp_strip_config $file
165
166 # make temp file
167 mv ${D}$file ${D}$file.temp
168
169 # run custom perl script to modify the kdmrc
170 ${FILESDIR}/kdmrc.pl < ${D}/$file.temp >> ${D}/$file
171
172 # remove temp file
173 rm -f ${D}$file.temp
174 else
175 echo "!!! $file not installed on system"
176 fi
177
178 }
179
180 modify_gdm_gdm_conf()
181 {
182 local file=/etc/X11/gdm/gdm.conf
183
184 if [ -f $file ] ; then
185 echo ">>> Modifying $file ..."
186
187 # get file
188 ltsp_strip_config $file
189
190 # make temp file
191 mv ${D}$file ${D}$file.temp
192
193 # run custom perl script to modify the gdm.conf
194 ${FILESDIR}/gdm.conf.pl < ${D}/$file.temp >> ${D}/$file
195
196 # remove temp file
197 rm -f ${D}$file.temp
198 else
199 echo "!!! $file not installed on system"
200 fi
201 }
202
203 src_compile() {
204 if [ "`has sandbox ${FEATURES}`" ]; then
205 einfo
206 einfo '!!! You have to add FEATURES="-sandbox" to /etc/make.conf '
207 einfo ' in order to emerge ltsp !!!'
208 einfo
209 die
210 fi
211 }
212
213 src_install() {
214 local XSERVERS="3dlabs 8514 agx fbdev i128 mach32 mach64 mach8 mono p9000 \
215 s3 s3v svga w32"
216
217 echo ">>> Installing root LTSP directory ..."
218 cd ${WORKDIR}/ltsp_core
219 ${FILESDIR}/install.sh i386 ${D}/opt/ltsp/
220 dodoc INSTALL README ${FILESDIR}/INSTALL.Gentoo
221
222 echo ">>> Installing the X core ..."
223 cd ${WORKDIR}/ltsp_x_core
224 ${FILESDIR}/install.sh i386 ${D}/opt/ltsp/
225
226 echo ">>> Installing the X fonts ..."
227 cd ${WORKDIR}/ltsp_x_fonts
228 ${FILESDIR}/install.sh i386 ${D}/opt/ltsp/
229
230 echo ">>> Installing the LTSP kernel ..."
231 cd ${WORKDIR}/ltsp_kernel
232 ${FILESDIR}/install.sh i386 ${D}/opt/ltsp/
233 dodir /tftpboot/lts
234 dodir /tftpboot/pxe
235 cp vmlinuz* ${D}/tftpboot/lts
236 insinto /tftpboot/pxe
237 doins ${FILESDIR}/eb-5.0.9-rtl8139.lzpxe
238 doins ${FILESDIR}/eb-5.0.9-eepro100.lzpxe
239 doins ${FILESDIR}/eb-5.0.9-3c905c-tpo.lzpxe
240
241 echo ">>> Installing the X Servers ..."
242 for d in $XSERVERS ; do
243 cd ${WORKDIR}/ltsp_x336_$d
244 ${FILESDIR}/install.sh i386 ${D}/opt/ltsp/
245 done
246
247 # make config dirs
248 dodir /usr/kde/3/share/config/kdm
249 dodir /etc/X11/gdm
250
251 ebegin "Copy the ltsp.conf file ..."
252 insinto /etc
253 doins ${FILESDIR}/ltsp.conf
254 eend
255
256 ebegin "Copying xdm files ..."
257 insinto /etc/X11/xdm
258 doins ${FILESDIR}/{Xsetup_workstation,ltsp.gif,Xaccess}
259 eend
260
261 ebegin "Copying dhcp files ..."
262 insinto /etc/dhcp
263 doins ${FILESDIR}/dhcpd.conf
264 eend
265
266 ebegin "Copying xinetd files ..."
267 insinto /etc/xinetd.d
268 doins ${FILESDIR}/tftp
269 eend
270
271 # modify config files
272 modify_exports
273 modify_xdm_xdm_config
274 modify_xdm_Xservers
275 if use kde; then
276 modify_xdm_kdmrc
277 fi
278
279 # gdm requires a custom config
280 if use gnome; then
281 modify_gdm_gdm_conf
282 ltsp_copy_config /etc/X11/gdm/Default
283
284 if test -f ${D}/etc/X11/gdm/Default -o -L ${D}/etc/X11/gdm/Default; then
285 mv ${D}/etc/X11/gdm/Default ${D}/etc/X11/gdm/\:0
286 fi
287
288 dosym /etc/X11/xdm/Xsetup_workstation /etc/X11/gdm/Default
289 fi
290
291 # ensure that these directories get copied even though they are empty
292 for empty_dir in dev oldroot proc root tmp ; do
293 keepdir /opt/ltsp/i386/${empty_dir}
294 done
295
296 rm -f ${D}/opt/ltsp/i386/etc/lts.conf
297 }
298
299 pkg_postinst() {
300 einfo "*******************************************************************************************"
301 einfo " | PLEASE LOOK AT THE MERGED CONFIG FILES AND UPDATE/OVERWRITE OLDER CONFS AS NEEDED! ***| "
302 einfo "*******************************************************************************************"
303 einfo " | YOU NEED TO EDIT YOUR UPDATED CONFIGURATION FILES TO COMPLETE THE LTSP INSTALLATION: *| "
304 einfo " |---------------------------------------------------------------------------------------| "
305 einfo " | FILE -------------------------| ACTION -----------------------------------------------| "
306 einfo " |---------------------------------------------------------------------------------------| "
307 einfo " | /etc/exports -----------------| Alter network address/netmask(nfs options) to match --| "
308 einfo " |-------------------------------| your current network/nfs settings --------------------| "
309 einfo " |---------------------------------------------------------------------------------------| "
310 einfo " | /etc/dhcp/dhcpd.conf ---------| Alter it to match your network settings and other ----| "
311 einfo " |-------------------------------| needs. Read comments inside dhcpd.conf for more... ---| "
312 einfo " |---------------------------------------------------------------------------------------| "
313 einfo " | /etc/conf.d/dhcp -------------| Alter IFACE setting if needed ------------------------| "
314 einfo " |---------------------------------------------------------------------------------------| "
315 einfo " | /opt/ltsp/i386/etc/lts.conf --| Alter LTSP config file to match your terminals -------| "
316 einfo " |---------------------------------------------------------------------------------------| "
317 einfo " | /etc/xinetd.d/tftp -----------| Change disable=yes to disable=no ---------------------| "
318 einfo " |---------------------------------------------------------------------------------------| "
319 einfo "*******************************************************************************************"
320 einfo " | YOU NEED TO ACTIVATE THESE SERVICES TO RUN LTSP SERVER: ------------------------------| "
321 einfo " |---------------------------------------------------------------------------------------| "
322 einfo " | SERVICE ----------------------| ACTION -----------------------------------------------| "
323 einfo " |---------------------------------------------------------------------------------------| "
324 einfo " | DHCP -------------------------| /etc/init.d/dhcp start -------------------------------| "
325 einfo " |-------------------------------| rc-update add dhcp default (for start at boot) -------| "
326 einfo " |---------------------------------------------------------------------------------------| "
327 einfo " | XDM --------------------------| /etc/init.d/xdm start --------------------------------| "
328 einfo " |-------------------------------| rc-update add xdm default (for start at boot) --------| "
329 einfo " |---------------------------------------------------------------------------------------| "
330 einfo " | TFTP FROM XINETD -------------| /etc/init.d/xinetd start -----------------------------| "
331 einfo " |-------------------------------| rc-update add xinetd default (for start at boot) -----| "
332 einfo " |---------------------------------------------------------------------------------------| "
333 einfo " | NFS --------------------------| /etc/init.d/nfs start --------------------------------| "
334 einfo " |-------------------------------| rc-update add nfs default (for start at boot) --------| "
335 einfo " |---------------------------------------------------------------------------------------| "
336 einfo "*******************************************************************************************"
337 einfo " | FOR MORE INFORMATION AND COMPLETE SET OF DOCUMENTATION GO TO WWW.LTSP.ORG ***********| "
338 einfo "*******************************************************************************************"
339 }

  ViewVC Help
Powered by ViewVC 1.1.20