Magellan Linux

Annotation of /trunk/extras/tigervnc/tigervnc-1.8.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30204 - (hide annotations) (download)
Fri Nov 3 11:15:09 2017 UTC (6 years, 6 months ago) by niro
File size: 9193 byte(s)
-disabled the java applet atm
1 niro 30203 # $Id$
2    
3     PNAME="tigervnc"
4     PVER="1.8.0"
5     PBUILD="r2"
6    
7     # enable java=1, disable java=0
8 niro 30204 ENABLE_JAVA_APPLET=0
9 niro 30203
10     SPLIT_PACKAGES="tigervnc-common tigervnc-server tigervnc-xserver-module"
11     if [[ ${ENABLE_JAVA_APPLET} = 1 ]]
12     then
13     SPLIT_PACKAGES+=" tigervnc-server-applet"
14     fi
15     SPLIT_PACKAGES+=" tigervnc"
16    
17     PCAT="net-misc"
18     HOMEPAGE="http://www.tigervnc.com/"
19    
20     SRCFILE="v${PVER}.tar.gz"
21     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
22    
23     XORG_PVER="1.19.5"
24     XORG="xorg-server-${XORG_PVER}.tar.bz2"
25     XORGSDIR="${BUILDDIR}/xorg-server-${XORG_PVER}"
26     XORGDDIR="${SRCDIR}/unix/xserver"
27    
28     COMMON_DEPEND=">= x11-libs/libX11-1.6
29     >= x11-libs/libXext-1.3
30     >= x11-libs/libSM-1.2
31     >= x11-libs/libXtst-1.2
32     >= x11-libs/libXi-1.7
33     >= x11-libs/fltk-1.3
34     >= sys-libs/zlib-1.2.5
35     >= sys-libs/libstdc++-6.3
36     >= virtual/libjpeg
37     >= app-crypt/gnutls-3.6"
38    
39     COMMON_FONTS_DEPEND=">= media-fonts/font-adobe-100dpi-1
40     >= media-fonts/font-adobe-75dpi-1
41     >= media-fonts/font-alias-1
42     >= media-fonts/font-cursor-misc-1
43     >= media-fonts/font-misc-misc-1"
44    
45     SERVER_DEPEND=">= x11-libs/libXfont-1.4
46     >= x11-libs/libxkbfile-1.0.8
47     >= x11-libs/pixman-0.34
48     >= media-libs/freetype-2.7
49     >= x11-apps/xauth-1.0.7
50     >= x11-apps/xsetroot-1.1
51     >= x11-misc/xkeyboard-config-2.8
52     >= sys-fs/udev-230"
53    
54     MODULE_DEPEND=">= virtual/X-ABI-EXTENSION-10.0
55     >= virtual/X-ABI-VIDEODRV-23
56     >= virtual/X-ABI-XINPUT-24.1"
57    
58     if [[ ${ENABLE_JAVA_APPLET} = 1 ]]
59     then
60     APPLET_DEPEND=">= virtual/java"
61     else
62     APPLET_DEPEND=""
63     fi
64    
65     SDEPEND="${COMMON_DEPEND}
66     ${COMMON_FONTS_DEPEND}
67     ${SERVER_DEPEND}
68     ${MODULE_DEPEND}
69     ${APPLET_DEPEND}
70     >= dev-util/desktop-file-utils-0.15
71     >= dev-lang/nasm-2
72     == x11-proto/xorg-protos-7.7.${XORG_PVER}
73     >= x11-libs/libpciaccess-0.13
74     >= media-fonts/font-util-1.3
75     >= virtual/java-jdk
76     >= gnome-base/librsvg-2.40
77     >= media-gfx/imagemagick-7"
78    
79     msetfeature "!check"
80     sminclude cmake xorg xdg mtools cleanutils
81    
82     SRC_URI=(
83     https://github.com/TigerVNC/${PNAME}/archive/${SRCFILE}
84     mirror://${PNAME}/${SRCFILE}
85     http://xorg.freedesktop.org/archive/individual/xserver/${XORG}
86     mirror://xorg-server/${XORG}
87     mirror://${PNAME}/tigervnc_48.png
88     mirror://${PNAME}/${PNAME}-1.1.0-gethomedir.patch
89     mirror://${PNAME}/${PNAME}-1.3.0-shebang.patch
90     mirror://${PNAME}/${PNAME}-1.4.2-getmaster.patch
91     )
92    
93     UP2SEPERATOR="v"
94     UP2DATE="updatecmd https://github.com/TigerVNC/${PNAME}/releases | highesttarball gz"
95    
96     split_info_tigervnc-common()
97     {
98     DESCRIPTION="Common TigerVNC libs and utils."
99     DEPEND="${COMMON_DEPEND}"
100     PROVIDE="virtual/vnc-client"
101     }
102    
103     split_info_tigervnc-server()
104     {
105     DESCRIPTION="TigerVNC VNC server."
106     DEPEND="== net-misc/tigervnc-common-${PVER}
107     ${COMMON_DEPEND}
108     ${COMMON_FONTS_DEPEND}
109     ${SERVER_DEPEND}"
110     PROVIDE="virtual/vnc"
111     }
112    
113     split_info_tigervnc-xserver-module()
114     {
115     DESCRIPTION="TigerVNC Xorg server module."
116     DEPEND="== net-misc/tigervnc-common-${PVER}
117     ${COMMON_FONTS_DEPEND}
118     ${MODULE_DEPEND}"
119     PROVIDE="virtual/vnc-x11"
120     }
121    
122     split_info_tigervnc-server-applet()
123     {
124     DESCRIPTION="TigerVNC VNC server."
125     DEPEND="${APPLET_DEPEND}"
126     PROVIDE="virtual/vnc-java"
127     }
128    
129     split_info_tigervnc()
130     {
131     DESCRIPTION="TigerVNC is a suite of VNC servers and clients that have a focus on performance and remote display functionality."
132     DEPEND="== net-misc/tigervnc-common-${PVER}
133     == net-misc/tigervnc-server-${PVER}
134     == net-misc/tigervnc-xserver-module-${PVER}"
135     if [[ ${ENABLE_JAVA_APPLET} = 1 ]]
136     then
137     DEPEND="${DEPEND}
138     == net-misc/tigervnc-server-applet-${PVER}"
139     fi
140    
141     PKGTYPE="virtual"
142    
143     # drop everything we don't need in the meta package:
144     INHERITS=""
145     SPECIAL_VARS=""
146     SPECIAL_FUNCTIONS=""
147     SDEPEND=""
148     PROVIDE=""
149     unset -f preinstall
150     unset -f postinstall
151     unset -f preremove
152     unset -f postremove
153     }
154    
155     src_prepare()
156     {
157     # munpack needs a suffix
158     tar xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${BUILDDIR} || die
159     munpack ${XORG} || die
160     cp -r ${XORGSDIR}/* ${XORGDDIR} || die
161     cd ${SRCDIR}
162    
163     # patchwork
164     # create X server cookie via mcookie
165     #mpatch ${PNAME}-1.1.0-gethomedir.patch || die
166    
167     # libvnc.so: don't use unexported GetMaster function
168     #mpatch ${PNAME}-1.4.2-getmaster.patch || die
169    
170     # don't use shebang in vncserver script.
171     mpatch ${PNAME}-1.3.0-shebang.patch || die
172    
173     # apply the included xorg patch
174     cd ${XORGDDIR}
175     local xorg_patch_ver="${XORG_PVER%.*}"
176     xorg_patch_ver="${xorg_patch_ver//.}"
177     patch -Np1 -i ../xserver${xorg_patch_ver}.patch || die
178    
179     # reconfigure xorg
180     cd ${XORGDDIR}
181     mautoreconf || die
182     }
183    
184     src_compile()
185     {
186     cd ${SRCDIR}
187     cmake_configure || die
188     mmake || die
189    
190     # build the x11 module
191     cd ${XORGDDIR}
192     mconfigure \
193     --with-default-font-path=/usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 \
194     --with-fontdir=/usr/share/fonts \
195     --with-rgb-path=/usr/share/X11/rgb.txt \
196     --with-xkb-output=/usr/share/X11/xkb \
197     --with-module-dir=/usr/$(mlibdir)/xorg/modules \
198     --with-dri-driver-path=/usr/$(mlibdir)/dri \
199     --with-pic \
200     --without-dtrace \
201     --disable-xorg \
202     --disable-composite \
203     --enable-xtrap \
204     --disable-xinerama \
205     --enable-glx \
206     --disable-xnest \
207     --disable-xvfb \
208     --disable-dmx \
209     --disable-xwin \
210     --disable-xephyr \
211     --disable-kdrive \
212     --disable-xwayland \
213     --disable-static \
214     --disable-dri \
215     --enable-dri2 \
216     --enable-dri3 \
217     --disable-present \
218     --disable-config-dbus \
219     --disable-config-hal \
220     --disable-config-udev \
221     --enable-install-libxf86config \
222     --disable-unit-tests \
223     --disable-devel-docs \
224     --disable-selective-werror \
225     || die
226    
227     mmake || die
228    
229     # build icons
230     cd ${SRCDIR}/media
231     mmake -j1 || die
232    
233     if [[ ${ENABLE_JAVA_APPLET} = 1 ]]
234     then
235     # build the java applet
236     cd ${SRCDIR}/java
237    
238     # cmake_configure does not work because of LIBDIR definition
239     cmake \
240     -DCMAKE_VERBOSE_MAKEFILE=ON \
241     -DCMAKE_BUILD_TYPE=Release \
242     -DCMAKE_INSTALL_PREFIX=/usr \
243     ${SRCDIR}/java \
244     || die
245    
246     mmake -j1 || die
247     fi
248     }
249    
250     src_install_tigervnc-common()
251     {
252     cd ${SRCDIR}
253     mmake DESTDIR=${BINDIR} install || die
254    
255     # cleanup
256     zapmost ${BINDIR} usr/bin/vncpasswd usr/bin/vncviewer usr/share/locale || die
257    
258     # install man pages
259     cp ${SRCDIR}/vncviewer/vncviewer.{man,1} || die
260     cp ${SRCDIR}/unix/vncpasswd/vncpasswd.{man,1} || die
261     minstallman ${SRCDIR}/vncviewer/vncviewer.1 || die
262     minstallman ${SRCDIR}/unix/vncpasswd/vncpasswd.1 || die
263    
264     # desktop icon
265     minstallpixmap media/icons/tigervnc_48.png vncviewer.png || die
266     minstall_desktop_icon \
267     --name "TigerVNC Viewer" \
268     --file "vncviewer" \
269     --comment "Connect to VNC server and display remote desktop" \
270     --exec /usr/bin/vncviewer \
271     --icon vncviewer.png \
272     --categories "Application,Network" \
273     || die
274    
275     # docs
276     minstalldocs README LICENCE.TXT || die
277     }
278    
279     src_install_tigervnc-server()
280     {
281     cd ${SRCDIR}
282     mmake DESTDIR=${BINDIR} install || die
283    
284     # install server module and binaries
285     cd ${XORGDDIR}/hw/vnc
286     mmake DESTDIR=${BINDIR} install || die
287    
288     # cleanup
289     rm ${BINDIR}/usr/bin/vncpasswd || die
290     rm ${BINDIR}/usr/bin/vncviewer || die
291     rm -r ${BINDIR}/usr/share/man || die
292     rm -r ${BINDIR}/usr/$(mlibdir) || die
293    
294     # install man pages
295     cp ${SRCDIR}/unix/vncconfig/vncconfig.{man,1} || die
296     cp ${SRCDIR}/unix/vncserver.{man,1} || die
297     cp ${SRCDIR}/unix/x0vncserver/x0vncserver.{man,1} || die
298     cp ${XORGDDIR}/hw/vnc/Xvnc.{man,1} || die
299     minstallman ${SRCDIR}/unix/vncconfig/vncconfig.1 || die
300     minstallman ${SRCDIR}/unix/vncserver.1 || die
301     minstallman ${SRCDIR}/unix/x0vncserver/x0vncserver.1 || die
302     minstallman ${XORGDDIR}/hw/vnc/Xvnc.1 || die
303     }
304    
305     src_install_tigervnc-xserver-module()
306     {
307     # install server module and binaries
308     cd ${XORGDDIR}/hw/vnc
309     mmake DESTDIR=${BINDIR} install || die
310    
311     # cleanup
312     zapmost ${BINDIR} usr/$(mlibdir) || die
313    
314     # not needed
315     rm ${BINDIR}/usr/$(mlibdir)/xorg/modules/extensions/libvnc.la || die
316    
317     # create a example config
318     minstalldir /etc/X11/xorg.conf.d || die
319     MCONFIG=/etc/X11/xorg.conf.d/20-vnc.conf
320     mclearconfig
321     maddconfig '# Example vnc module configuration'
322     maddconfig '# Uncomment these entries and set a password with the vncpasswd program'
323     maddconfig
324     maddconfig 'Section "Module"'
325     maddconfig ' Load "vnc"'
326     maddconfig 'EndSection'
327     maddconfig
328     maddconfig 'Section "Screen"'
329     maddconfig ' Identifier "Screen0"'
330     maddconfig ' Option "SecurityTypes" "VncAuth"'
331     maddconfig ' Option "UserPasswdVerifier" "VncAuth"'
332     maddconfig ' Option "PasswordFile" "/root/.vnc/passwd"'
333     maddconfig 'EndSection'
334     }
335    
336     src_install_tigervnc-server-applet()
337     {
338     cd ${SRCDIR}/java
339     minstalldir /usr/share/vnc/classes || die
340     minstallexec VncViewer.jar /usr/share/vnc/classes || die
341     minstallfile com/tigervnc/vncviewer/index.vnc /usr/share/vnc/classes || die
342     }
343    
344     postinstall_tigervnc-xserver-module()
345     {
346     echo
347     echo 'Add following to /etc/X11/xorg.conf.d/20-vnc.conf for native X display support:'
348     echo ' Section "Module"'
349     echo ' ...'
350     echo ' Load "vnc"'
351     echo ' EndSection'
352     echo
353     echo 'To enable VNC password authentification use the vncpasswd program:'
354     echo ' "vncpasswd"'
355     echo
356     echo 'You will also need to tell the VNC module where the password is stored:'
357     echo ' Section "Screen"'
358     echo ' ...'
359     echo ' Option "SecurityTypes" "VncAuth"'
360     echo ' Option "UserPasswdVerifier" "VncAuth"'
361     echo ' Option "PasswordFile" "/root/.vnc/passwd"'
362     echo ' EndSection'
363     echo
364     }