Annotation of /trunk/todo/nxserver-freenx/nxserver-freenx-0.7.2-r5.smage2
Parent Directory | Revision Log
Revision 2499 -
(hide annotations)
(download)
Thu Jul 9 20:10:12 2009 UTC (15 years, 2 months ago) by niro
File size: 5229 byte(s)
Thu Jul 9 20:10:12 2009 UTC (15 years, 2 months ago) by niro
File size: 5229 byte(s)
-moved to 'todo'
1 | niro | 2 | # $Header: /magellan-cvs/smage/nxserver-freenx/nxserver-freenx-0.7.2-r5.smage2,v 1.1 2008/04/20 12:55:19 niro Exp $ |
2 | |||
3 | PNAME="nxserver-freenx" | ||
4 | PVER="0.7.2" | ||
5 | PBUILD="r5" | ||
6 | |||
7 | PCATEGORIE="net-misc" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="A free NX server implementation." | ||
11 | HOMEPAGE="http://freenx.berlios.de/" | ||
12 | |||
13 | # binutils is only needed for the strings binary! | ||
14 | DEPEND=">= net-misc/openssh-4 | ||
15 | >= dev-util/expect-5.43 | ||
16 | >= sys-apps/gawk-1.3.5 | ||
17 | >= net-misc/netcat-0.7.1 | ||
18 | >= net-misc/nx-3.0.0 | ||
19 | >= net-misc/rdesktop-1 | ||
20 | >= net-misc/vnc-4 | ||
21 | >= x11-apps/xauth-1 | ||
22 | >= x11-apps/xdm-1 | ||
23 | >= x11-apps/xrdb-1 | ||
24 | >= x11-apps/xmessage-1 | ||
25 | >= media-fonts/font-misc-misc-1 | ||
26 | >= media-fonts/font-cursor-misc-1 | ||
27 | >= sys-dev/binutils-2.18 | ||
28 | >= sys-apps/coreutils-6.10" | ||
29 | |||
30 | SDEPEND=">= sys-apps/sed-4" | ||
31 | |||
32 | SRCFILE="freenx-server-${PVER}.tar.gz" | ||
33 | SRCDIR="${BUILDDIR}/freenx-server-${PVER}" | ||
34 | |||
35 | sminclude mtools | ||
36 | |||
37 | SRC_URI=( | ||
38 | http://download.berlios.de/freenx/${SRCFILE} | ||
39 | mirror://${PNAME}/${SRCFILE} | ||
40 | mirror://${PNAME}/${PNAME}-0.7.1-xorg71.patch | ||
41 | mirror://${PNAME}/${PNAME}-${PVER}-nx32-backend.patch | ||
42 | mirror://${PNAME}/${PNAME}-0.6.1-fullscreen.patch | ||
43 | mirror://${PNAME}/${PNAME}-${PVER}-reconnect.patch | ||
44 | mirror://${PNAME}/${PNAME}-0.5.0-libdir.patch | ||
45 | mirror://${PNAME}/${PNAME}-0.5.0-enable-arts.patch | ||
46 | mirror://${PNAME}/${PNAME}-0.6.1-enable-cups.patch | ||
47 | mirror://${PNAME}/${PNAME}-${PVER}-nxagent-path.patch | ||
48 | mirror://${PNAME}/${PNAME}-${PVER}-libxrender.patch | ||
49 | ) | ||
50 | |||
51 | UP2DATE="updatecmd_berlios freenx freenx-server" | ||
52 | |||
53 | src_prepare() | ||
54 | { | ||
55 | munpack ${SRCFILE} || die | ||
56 | cd ${SRCDIR} | ||
57 | |||
58 | # xorg7.1 compat | ||
59 | mpatch ${PNAME}-0.7.1-xorg71.patch || die | ||
60 | # enable nx-2/3.[012].0 backend compatibility | ||
61 | mpatch ${PNAME}-${PVER}-nx32-backend.patch || die | ||
62 | # fix fullscreen sessions | ||
63 | mpatch ${PNAME}-0.6.1-fullscreen.patch || die | ||
64 | # enable auto-reconnect | ||
65 | mpatch ${PNAME}-${PVER}-reconnect.patch || die | ||
66 | # fix nx lib path | ||
67 | mpatch ${PNAME}-0.5.0-libdir.patch || die | ||
68 | # enable arts support | ||
69 | mpatch ${PNAME}-0.5.0-enable-arts.patch || die | ||
70 | # enable cups support | ||
71 | mpatch ${PNAME}-0.6.1-enable-cups.patch || die | ||
72 | # fixes the path to the real nxagent binary | ||
73 | mpatch ${PNAME}-${PVER}-nxagent-path.patch || die | ||
74 | # fixes search path of libXrender.so.1 | ||
75 | mpatch ${PNAME}-${PVER}-libxrender.patch || die | ||
76 | |||
77 | # fixup multilib pathes | ||
78 | sed -i "/PATH_LIB=/s/lib/$(mlibdir)/g" nxloadconfig || die | ||
79 | sed -i "/NXAGENT_PATH_BIN=/s/lib/$(mlibdir)/g" nxloadconfig || die | ||
80 | } | ||
81 | |||
82 | src_compile() | ||
83 | { | ||
84 | cd ${SRCDIR} | ||
85 | |||
86 | # compile nxserver-helper | ||
87 | mmake -C nxserver-helper || die | ||
88 | |||
89 | # compile nxredir | ||
90 | mmake -C nxredir || die | ||
91 | } | ||
92 | |||
93 | src_install() | ||
94 | { | ||
95 | cd ${SRCDIR} | ||
96 | |||
97 | minstallexec nxcups-gethost || die | ||
98 | minstallexec nxdesktop_helper || die | ||
99 | minstallexec nxdialog || die | ||
100 | minstallexec nxkeygen || die | ||
101 | minstallexec nxloadconfig || die | ||
102 | minstallexec nxnode || die | ||
103 | minstallexec nxnode-login || die | ||
104 | minstallexec nxprint || die | ||
105 | minstallexec nxserver || die | ||
106 | minstallexec nxsetup || die | ||
107 | minstallexec nxviewer_helper || die | ||
108 | |||
109 | # install nxserver-helper | ||
110 | minstallexec nxserver-helper/nxserver-helper || die | ||
111 | |||
112 | # install nx's cups samba backend | ||
113 | minstalldir /usr/$(mlibdir)/cups/backend || die | ||
114 | minstalldir /usr/$(mlibdir)/NX/lib || die | ||
115 | minstallexec nxredir/nxredir || die | ||
116 | minstalllib nxredir/libnxredir.so.0 /usr/$(mlibdir)/NX/lib || die | ||
117 | minstallexec nxredir/nxsmb /usr/$(mlibdir)/cups/backend || die | ||
118 | |||
119 | # create needed empty directories and files | ||
120 | mkeepdir /etc/nxserver || die | ||
121 | memptyfile /etc/nxserver/passwords || die | ||
122 | memptyfile /etc/nxserver/passwords.orig || die | ||
123 | mchmod 0600 /etc/nxserver/passwords || die | ||
124 | mchmod 0600 /etc/nxserver/passwords.orig || die | ||
125 | |||
126 | # install the default config file | ||
127 | minstallfile node.conf.sample /etc/nxserver/node.conf || die | ||
128 | |||
129 | mkeepdir /var/lib/nxserver/home || die | ||
130 | mchown nx.nx /var/lib/nxserver/home || die | ||
131 | mkeepdir /var/lib/nxserver/db/running || die | ||
132 | mchmod 0700 /var/lib/nxserver/db/running || die | ||
133 | mkeepdir /var/lib/nxserver/db/closed || die | ||
134 | mchmod 0700 /var/lib/nxserver/db/closed || die | ||
135 | } | ||
136 | |||
137 | preinstall() | ||
138 | { | ||
139 | # block if nx free-edition is installed | ||
140 | if [[ -n $(magequery -n nxserver-freeedition) ]] | ||
141 | then | ||
142 | echo | ||
143 | echo "You have 'net-misc/nxserver-freeedition' installed on your system." | ||
144 | echo | ||
145 | echo "Both ${PCATEGORIE}/${PNAME} and 'net-misc/nxserver-freeedition'" | ||
146 | echo "cannot be installed at the same time. Please uninstall nxserver-freeedition first!" | ||
147 | echo | ||
148 | die "net-misc/nxserver-freeedition found." | ||
149 | fi | ||
150 | } | ||
151 | |||
152 | postinstall() | ||
153 | { | ||
154 | # fix permissions | ||
155 | chown -R nx.nx /var/lib/nxserver/home | ||
156 | |||
157 | ${MLIBDIR}/museradd -o "-s /usr/bin/nxserver -d /var/lib/nxserver/home" nx | ||
158 | |||
159 | # autoscramble nx system-user password if none was set | ||
160 | if [[ -n $(passwd -S nx | grep ' NP ') ]] | ||
161 | then | ||
162 | usermod -p $(openssl passwd -1 $(mktemp -u | cut -d. -f2)) nx | ||
163 | fi | ||
164 | |||
165 | # shutup install errors if kde is not installed on the system | ||
166 | install -d ${MROOT}/${HOME}/.kde/share/config | ||
167 | touch ${MROOT}/${HOME}/.kde/share/config/kdeprintrc | ||
168 | |||
169 | echo "Running freenx's setup script" | ||
170 | ${MROOT}/usr/bin/nxsetup --setup-nomachine-key --install | ||
171 | |||
172 | echo | ||
173 | # echo "You must run 'nxsetup --setup-nomachine-key --install' to complete the installation." | ||
174 | echo "You also need to set a password for the user nx or pam permits ssh logins." | ||
175 | echo "To add a NX user run 'nxserver --adduser [username]'" | ||
176 | echo "and set a password with 'nxserver --passwd [username]'." | ||
177 | echo | ||
178 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |