Magellan Linux

Contents of /trunk/extras/nxserver-freeedition/nxserver-freeedition-3.2.0-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 3349 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/nxserver-freeedition/nxserver-freeedition-3.2.0-r3.smage2,v 1.1 2008/07/11 15:13:38 niro Exp $
2
3 PNAME="nxserver-freeedition"
4 PVER="3.2.0"
5 PBUILD="r3"
6
7 PCATEGORIE="net-misc"
8 STATE="unstable"
9
10 DESCRIPTION="NoMachine NX Free Edition server."
11 HOMEPAGE="http://www.nomachine.com/"
12
13 DEPEND="== net-misc/nxnode-${PVER}
14 >= sys-apps/coreutils-6.10
15 >= x11-apps/xauth-1
16 >= media-fonts/font-misc-misc-1
17 >= media-fonts/font-cursor-misc-1"
18
19 NXPVER="${PVER}-13"
20 # both files must be fetch or our md5-logic breaks
21 SRCFILE_x86="nxserver-${NXPVER}.i386.tar.gz"
22 SRCFILE_x86_64="nxserver-${NXPVER}.x86_64.tar.gz"
23 # decide between x86 and x86_64 arch
24 SRCFILE="$(eval echo \$SRCFILE_${ARCH/i*86/x86})"
25 SRCDIR="${BUILDDIR}/NX"
26
27 sminclude mtools
28
29 SRC_URI=(
30 http://64.34.161.181/download/${PVER}/Linux/FE/${SRCFILE_x86}
31 http://64.34.161.181/download/${PVER}/Linux/FE/${SRCFILE_x86_64}
32 mirror://${PNAME}/${SRCFILE_x86}
33 mirror://${PNAME}/${SRCFILE_x86_64}
34 mirror://${PNAME}/${PNAME}-3.1.0-magellan.patch
35 )
36
37 src_prepare()
38 {
39 munpack ${SRCFILE} || die
40 cd ${SRCDIR}
41
42 # fixes the setup script on magellan
43 mpatch ${PNAME}-3.1.0-magellan.patch || die
44 }
45
46 src_install()
47 {
48 cd ${SRCDIR}
49
50 # needed directories
51 minstalldir /usr/NX/etc || die
52 minstalldir /usr/NX/bin || die
53
54 # install nx environment
55 minstallexec bin/nxserver /usr/NX/bin || die
56 local i
57 for i in home lib scripts share var
58 do
59 cp -R ${i} ${BINDIR}/usr/NX || die
60 done
61
62 # install the ssh-keys
63 cp -R etc/keys ${BINDIR}/usr/NX/etc || die
64
65 # install some sample configs
66 minstallfile etc/administrators.db.sample /usr/NX/etc || die
67 minstallfile etc/guests.db.sample /usr/NX/etc || die
68 minstallfile etc/passwords.db.sample /usr/NX/etc || die
69 minstallfile etc/profiles.db.sample /usr/NX/etc || die
70 minstallfile etc/users.db.sample /usr/NX/etc || die
71 minstallfile etc/server.lic.sample /usr/NX/etc || die
72 minstallfile etc/server-debian.cfg.sample /usr/NX/etc/server-magellan.cfg.sample || die
73 }
74
75 preinstall()
76 {
77 # abort install if freenx is installed
78 if [[ -n $(magequery -n nxserver-freenx) ]]
79 then
80 echo
81 echo "You have 'net-misc/nxserver-freenx' installed on your system."
82 echo
83 echo "Both ${PCATEGORIE}/${PNAME} and 'net-misc/nxserver-freenx'"
84 echo "cannot be installed at the same time. Please uninstall nxserver-freenx first!"
85 echo
86 die "net-misc/nxserver-freenx found."
87 fi
88 }
89
90 postinstall()
91 {
92 ${MLIBDIR}/museradd -o "-s /usr/NX/bin/nxserver -d /usr/NX/home/nx" nx
93
94 # autoscramble nx system-user password if none was set
95 if [[ -n $(passwd -S nx | grep ' NP ') ]]
96 then
97 usermod -p $(openssl passwd -1 $(mktemp -u | cut -d. -f2)) nx
98 fi
99
100 # only run install when no configuration file is found
101 if [[ -f /usr/NX/etc/server.cfg ]]
102 then
103 echo "Running NoMachine's update script"
104 ${MROOT}/usr/NX/scripts/setup/nxserver --update
105 else
106 echo "Running NoMachine's setup script"
107 ${MROOT}/usr/NX/scripts/setup/nxserver --install
108 fi
109
110 # echo
111 # echo "You must run 'nxserver --install' to complete the installation."
112 # echo "If you are upgrading an old nxserver version you must run 'nxserver --update'."
113 echo
114 echo "You also need to set a password for the user nx or pam permits ssh logins."
115 echo "To add a NX user run '/usr/NX/bin/nxserver --useradd [username]'"
116 echo "and set a password with '/usr/NX/bin/nxserver --passwd [username]'."
117 echo
118 }

Properties

Name Value
svn:keywords Id