Magellan Linux

Contents of /branches/magellan-next/extras/nxclient/nxclient-3.5.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8893 - (show annotations) (download)
Fri Aug 12 11:44:39 2011 UTC (13 years, 3 months ago) by niro
File size: 4347 byte(s)
-removed local STATE
1 # $Id$
2
3 PNAME="nxclient"
4 PVER="3.5.0"
5 PBUILD="r2"
6
7 PCATEGORIE="net-misc"
8
9 DESCRIPTION="A client for NX servers."
10 HOMEPAGE="http://www.nomachine.com/"
11
12 DEPEND=">= dev-libs/expat-2
13 >= media-libs/freetype-2.4
14 >= media-libs/fontconfig-2.8
15 >= x11-libs/libXft-2.2
16 >= x11-libs/libX11-1.4
17 >= x11-libs/libXdmcp-1
18 >= x11-libs/libXrender-0.9
19 >= x11-libs/libXau-1
20 >= x11-libs/libXext-1.3
21 >= sys-libs/zlib-1.2
22 >= media-libs/libjpeg-8
23 >= media-libs/libpng-1.5
24 >= dev-libs/openssl-1.0.0d
25 >= media-libs/audiofile-0.2.7
26 >= net-print/cups-1.4"
27
28 SDEPEND=">= dev-util/desktop-file-utils-0.15"
29
30 NXPVER="${PVER}-7"
31 NXPVER64="${NXPVER}"
32 # both files must be fetch or our md5-logic breaks
33 SRCFILE_x86="${PNAME}-${NXPVER}.i386.tar.gz"
34 SRCFILE_x86_64="${PNAME}-${NXPVER64}.x86_64.tar.gz"
35 # decide between x86 and x86_64 arch
36 SRCFILE="$(eval echo \$SRCFILE_${ARCH/i*86/x86})"
37 SRCDIR="${BUILDDIR}/NX"
38
39 NXSSH_PVER="${PVER}-2"
40 NXSSH_SRCFILE="nxssh-${NXSSH_PVER}.tar.gz"
41 NXSSH_SRCDIR="${BUILDDIR}/nxssh"
42
43 NXCOMP_PVER="${PVER}-2"
44 NXCOMP_SRCFILE="nxcomp-${NXCOMP_PVER}.tar.gz"
45 NXCOMP_SRCDIR="${BUILDDIR}/nxcomp"
46
47 NXCOMPSH_PVER="${PVER}-1"
48 NXCOMPSH_SRCFILE="nxcompsh-${NXCOMPSH_PVER}.tar.gz"
49 NXCOMPSH_SRCDIR="${BUILDDIR}/nxcompsh"
50
51 sminclude mtools xdg
52
53 SRC_URI=(
54 http://web04.nomachine.com/download/${PVER}/Linux/${SRCFILE_x86}
55 http://web04.nomachine.com/download/${PVER}/Linux/${SRCFILE_x86_64}
56 http://web04.nomachine.com/download/${PVER}/sources/${NXSSH_SRCFILE}
57 http://web04.nomachine.com/download/${PVER}/sources/${NXCOMP_SRCFILE}
58 http://web04.nomachine.com/download/${PVER}/sources/${NXCOMPSH_SRCFILE}
59 mirror://${PNAME}/${SRCFILE_x86}
60 mirror://${PNAME}/${SRCFILE_x86_64}
61 mirror://${PNAME}/${NXSSH_SRCFILE}
62 mirror://${PNAME}/${NXCOMP_SRCFILE}
63 mirror://${PNAME}/${NXCOMPSH_SRCFILE}
64 mirror://${PNAME}/nxclient-wrapper
65 mirror://${PNAME}/nxcompsh-3.4.0-gcc43.patch
66 mirror://${PNAME}/nxcomp-3.5.0-libpng15.patch
67 )
68
69 UP2DATE="updatecmd ${HOMEPAGE}/sources.php | grep nx-X11 | sed 's/.*nx-X11-\(.*\)-.*/\1/;q'"
70
71 src_prepare()
72 {
73 munpack ${SRCFILE} || die
74 munpack ${NXCOMP_SRCFILE} || die
75 munpack ${NXCOMPSH_SRCFILE} || die
76 munpack ${NXSSH_SRCFILE} || die
77
78 # fix some compile issues with gcc >=4.3
79 cd ${NXCOMPSH_SRCDIR}
80 mpatch nxcompsh-3.4.0-gcc43.patch || die
81
82 # fix build issues against libpng-1.5
83 cd ${NXCOMP_SRCDIR}
84 mpatch nxcomp-3.5.0-libpng15.patch || die
85 }
86
87 src_compile()
88 {
89 # nxcomp is needed to successfully compile nxssh
90 cd ${NXCOMP_SRCDIR}
91 ./configure || die
92 mmake || die
93
94 # rebuild needed; provided is linked against libjpeg.so.62
95 cd ${NXCOMPSH_SRCDIR}
96 ./configure || die
97 mmake || die
98
99 # we rebuild nxssh to be compatible with our openssl version
100 cd ${NXSSH_SRCDIR}
101 ./configure --prefix=/usr/NX || die
102 mmake || die
103 }
104
105 src_install()
106 {
107 cd ${SRCDIR}
108
109 # needed directories
110 minstalldir /usr/bin || die
111 minstalldir /usr/NX/bin || die
112 minstalldir /usr/NX/lib || die
113 minstalldir /usr/NX/share || die
114
115 local i
116 for i in nxclient nxesd nxkill nxprint nxservice
117 do
118 minstallexec -s nxclient-wrapper /usr/bin/${i} || die
119 minstallexec ${SRCDIR}/bin/${i} /usr/NX/bin || die
120 done
121
122 # install our rebuilded nxssh
123 minstallexec -s nxclient-wrapper /usr/bin/nxssh || die
124 minstallexec ${NXSSH_SRCDIR}/nxssh /usr/NX/bin || die
125
126 # install our rebuilded libs
127 cp -a ${NXCOMP_SRCDIR}/libXcomp.so* ${BINDIR}/usr/NX/lib || die
128 cp -a ${NXCOMPSH_SRCDIR}/libXcompsh.so* ${BINDIR}/usr/NX/lib || die
129
130 # share data
131 cp -a ${SRCDIR}/share/* ${BINDIR}/usr/NX/share || die
132
133 # install some desktop icons
134 minstallpixmap ${SRCDIR}/share/icons/48x48/nxclient-icon.png nxclient.png
135 minstall_desktop_icon \
136 --name NXClient \
137 --comment "NoMachine NX Client" \
138 --file "nxclient" \
139 --exec "nxclient" \
140 --icon "nxclient.png" \
141 --categories Network \
142 || die
143
144 minstallpixmap ${SRCDIR}/share/icons/48x48/nxclient-admin.png nxadmin.png
145 minstall_desktop_icon \
146 --name NXAdmin \
147 --comment "NoMachine NX Administration Console" \
148 --file "nxadmin" \
149 --exec "nxclient --admin" \
150 --icon "nxadmin.png" \
151 --categories Network \
152 || die
153
154 minstallpixmap ${SRCDIR}/share/icons/48x48/nxclient-wizard.png nxwizard.png
155 minstall_desktop_icon \
156 --name NXWizard \
157 --comment "NoMachine NX Configuration Wizard" \
158 --file "nxwizard" \
159 --exec "nxclient --wizard" \
160 --icon "nxwizard.png" \
161 --categories Network \
162 || die
163 }