wok view tightvnc/receipt @ rev 24340

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jan 31 11:41:46 2022 +0000 (2022-01-31)
parents d1b6fe8c8301
children 6304be04f8b3
line source
1 # SliTaz package receipt.
3 PACKAGE="tightvnc"
4 VERSION="1.3.10"
5 CATEGORY="x-window"
6 SHORT_DESC="VNC server (graphical remote control)."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-${VERSION}_unixsrc.tar.bz2"
10 WEB_SITE="http://www.tightvnc.com/"
11 WGET_URL="$SF_MIRROR/vnc-tight/$TARBALL"
12 DEPENDS="xorg-base-fonts jpeg zlib"
13 BUILD_DEPENDS="xorg-imake xorg-gccmakedep xorg-cf-files xorg-libXp \
14 xorg-libXaw-dev xorg-libXt-dev xorg-xproto xorg-libXau-dev xorg-libXdmcp-dev \
15 xorg-libXmu-dev xorg-xextproto xorg-printproto xorg-kbproto xorg-inputproto \
16 xorg-scrnsaverproto xorg-xauth jpeg-dev zlib-dev xorg-libXrandr-dev"
17 TAGS="remote-desktop vnc"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - https://sourceforge.net/projects/vnc-tight/files/TightVNC-unix/ 2>/dev/null | \
23 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
24 sed '/scope="row/!d;s|.*/TightVNC-unix/||;s|/.*||;q'
25 }
27 # Rules to configure and make the package.
28 compile_rules()
29 {
30 [ -d vnc_unixsrc ] && mv vnc_unixsrc $src
31 cd $src
32 sed -i -e "s| FONTDIR =.*$| FONTDIR = /usr/share/fonts/X11|" \
33 -e 's|\(define DefaultRGBDatabase\) .*|\1 /usr/share/X11/rgb|' \
34 Xvnc/config/cf/X11.tmpl
35 xmkmf &&
36 make -j1 World &&
37 cd Xvnc &&
38 ./configure --prefix=/usr $CONFIGURE_ARGS || return 1
39 sed 's|PROTO_DEFINES =|PROTO_DEFINES = -D_XOPEN_SOURCE=500L|' \
40 -i programs/Xserver/os/Makefile lib/font/fc/Makefile || return 1
41 find -name Makefile | xargs sed -i 's|/usr/X11R6/bin|/usr/bin|g'
42 make -j1 &&
43 make -j1 DESTDIR=$DESTDIR install
44 cd .. &&
45 make -j1 DESTDIR=$DESTDIR install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/usr/bin
52 cp -a $install/usr/bin/Xvnc $fs/usr/bin
53 cp $src/vncpasswd/vncpasswd $fs/usr/bin
54 cat > $fs/usr/bin/startvnc <<EOM
55 #!/bin/sh
57 case "\$1" in
58 ''|:*) ;;
59 *) cat <<EOT
60 Usage: \$0 [display] [geometry] [depth]
61 Default: \$0 :1 1920x1024 24
62 EOT
63 exit 1
64 esac
66 . \$HOME/.config/slitaz/applications.conf
67 Xvnc -ac -geometry \${2:-1920x1024} -depth \${3:-24} :\${1:-1} &
68 export DISPLAY=:\${1:-1}
69 exec \$WINDOW_MANAGER
70 EOM
71 chmod +x $fs/usr/bin/startvnc
72 }