Magellan Linux

Contents of /branches/R11-unstable/extras/nxnode/nxnode-3.5.0-r7.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12508 - (show annotations) (download)
Tue Jun 5 13:18:02 2012 UTC (11 years, 11 months ago) by niro
Original Path: trunk/extras/nxnode/nxnode-3.5.0-r7.smage2
File size: 3386 byte(s)
-fixed typos
1 # $Id$
2
3 PNAME="nxnode"
4 PVER="3.5.0"
5 PBUILD="r7"
6
7 PCAT="net-misc"
8
9 DESCRIPTION="Shared NX components for several NX Server Editions."
10 HOMEPAGE="http://www.nomachine.com"
11
12 DEPEND="== net-misc/nxclient-${PVER}
13 >= x11-libs/libICE-1
14 >= x11-libs/libXmu-1
15 >= x11-libs/libSM-1
16 >= x11-libs/libXt-1
17 >= x11-libs/libXaw-1
18 >= x11-libs/libXpm-3
19 >= x11-apps/xrdb-1
20 >= net-misc/rdesktop-1
21 >= virtual/vnc-client
22 == net-misc/nxcomp-${PVER}
23 == net-misc/nxcompsh-${PVER}
24 == net-misc/nxcompext-${PVER}
25 == net-misc/nxcomshad-${PVER}
26 == net-misc/nxprint-${PVER}
27 == net-misc/nxssh-${PVER}
28 == net-misc/nx-${PVER}
29 == net-misc/nxagent-${PVER}
30 == net-misc/nxsensor-${PVER}
31 == net-misc/nxuexec-${PVER}"
32
33 PROVIDE="virtual/nxnode"
34
35 NXPVER="${PVER}-9"
36 # both files must be fetch or our md5-logic breaks
37 SRCFILE_x86="${PNAME}-${NXPVER}.i386.tar.gz"
38 SRCFILE_x86_64="${PNAME}-${NXPVER}.x86_64.tar.gz"
39 # decide between x86 and x86_64 arch
40 SRCFILE="$(eval echo \$SRCFILE_${ARCH/i*86/x86})"
41 SRCDIR="${BUILDDIR}/NX"
42
43 sminclude mtools
44
45 SRC_URI=(
46 http://web04.nomachine.com/download/${PVER}/Linux/${SRCFILE_x86}
47 http://web04.nomachine.com/download/${PVER}/Linux/${SRCFILE_x86_64}
48 mirror://${PNAME}/${SRCFILE_x86}
49 mirror://${PNAME}/${SRCFILE_x86_64}
50 mirror://${PNAME}/${PNAME}-3.0.0-magellan.patch
51 )
52
53 UP2DATE="updatecmd ${HOMEPAGE}/sources.php | grep nx-X11 | sed 's/.*nx-X11-\(.*\)-.*/\1/;q'"
54
55 src_prepare()
56 {
57 munpack ${SRCFILE} || die
58 cd ${SRCDIR}
59
60 # fixes the setup script on magellan
61 mpatch ${PNAME}-3.0.0-magellan.patch || die
62 }
63
64 src_install()
65 {
66 cd ${SRCDIR}
67
68 # nxagent, nxsensor and nxuexec are provided by other packages
69 minstalldir /usr/NX/bin || die
70 minstallexec bin/nxnode /usr/NX/bin/nxnode || die
71 minstallexec bin/nxspool /usr/NX/bin/nxspool || die
72 mcopy -R scripts /usr/NX || die
73 mcopy -R share /usr/NX || die
74 mcopy -R var /usr/NX || die
75
76 # only copy libs not provided by other packages
77 minstalldir /usr/NX/lib || die
78 mcopy -R lib/perl /usr/NX/lib/ || die
79 mcopy lib/libesddsp.so\* /usr/NX/lib || die
80 mcopy lib/libesd.so\* /usr/NX/lib || die
81
82 minstalldir /usr/NX/etc || die
83 minstallfile etc/node-debian.cfg.sample /usr/NX/etc/node-magellan.cfg.sample || die
84 minstallfile etc/node.lic.sample /usr/NX/etc/node.lic.sample || die
85
86 # fix fuser command
87 sed -i 's:COMMAND_FUSER = .*:COMMAND_FUSER = "/usr/bin/fuser":;' ${BINDIR}/usr/NX/etc/node-magellan.cfg.sample || die
88
89 # set default dpi to 75 instead of 96dpi
90 sed -i 's:#DefaultXDPI = .*:DefaultXDPI = "75":;' ${BINDIR}/usr/NX/etc/node-magellan.cfg.sample || die
91 }
92
93 postinstall()
94 {
95 if [[ ! -f /usr/NX/etc/node.lic ]]
96 then
97 cp ${MROOT}/usr/NX/etc/node.lic.sample ${MROOT}/usr/NX/etc/node.lic || die
98 chmod 0400 ${MROOT}/usr/NX/etc/node.lic
99 chown nx:root ${MROOT}/usr/NX/etc/node.lic
100 fi
101
102 if [[ -f /usr/NX/etc/node.cfg ]]
103 then
104 echo "Running NoMachine's update script"
105 ${MROOT}/usr/NX/scripts/setup/nxnode --update
106 else
107 echo "Running NoMachine's setup script"
108 ${MROOT}/usr/NX/scripts/setup/nxnode --install
109 fi
110 }
111
112 preinstall()
113 {
114 # abort install if freenx is installed
115 if [[ -n $(magequery -n nxserver-freenx) ]]
116 then
117 echo
118 echo "You have 'net-misc/nxserver-freenx' installed on your system."
119 echo
120 echo "Both ${PCAT}/${PNAME} and 'net-misc/nxserver-freenx'"
121 echo "cannot be installed at the same time. Please uninstall nxserver-freenx first!"
122 echo
123 die "net-misc/nxserver-freenx found."
124 fi
125 }