diff options
author | Eric Hameleers <alien@slackware.com> | 2006-11-21 10:59:54 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2006-11-21 10:59:54 +0000 |
commit | 6ba3df11cc539f0cd9248a60def2f71da6ee45db (patch) | |
tree | 1274a54b117b29b7cd2d4f8ffa7b986f01a89a60 /vnc/build | |
parent | b822482d38e61c0de505eb702f553198fcfc24b8 (diff) | |
download | asb-6ba3df11cc539f0cd9248a60def2f71da6ee45db.tar.gz asb-6ba3df11cc539f0cd9248a60def2f71da6ee45db.tar.xz |
Initial revision
Diffstat (limited to 'vnc/build')
-rwxr-xr-x | vnc/build/vnc.SlackBuild | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/vnc/build/vnc.SlackBuild b/vnc/build/vnc.SlackBuild new file mode 100755 index 00000000..c8e24f1b --- /dev/null +++ b/vnc/build/vnc.SlackBuild @@ -0,0 +1,151 @@ +#!/bin/sh +# $Id$ +# ----------------------------------------------------------------------------- +# +# Slackware SlackBuild script +# =========================== +# By: Eric Hameleers <alien@sox.homeip.net> +# For: RealVNC +# URL: http://www.realvnc.com/ +# Needs: Fairly recent version of X +# Changelog: +# 4.0-1: 16/oct/2004 by Eric Hameleers +# 4_1_1-1: 30/apr/2005 by Eric Hameleers +# * Unfortunately, there's no updated documentation tarball yet. +# 4_1_1-2: 02/aug/2005 by Eric Hameleers +# * Forgot to add the vnc extension for X to the package. +# 4_1_1-3: 12/aug/2005 by Eric Hameleers +# * Somehow the permissions of the package were messed up, so that +# after installation,. / was group-writable and Sendmail +# refused to run. Fixed this in _vnc.tar.gz. +# +# ----------------------------------------------------------------------------- +# +# Issue 'sh SlackBuild --cleanup' to build a Slackware package. +# The package (.tgz) plus descriptive .txt file are created in /tmp . +# Install using 'installpkg'. +# +# ----------------------------------------------------------------------------- + + +# --- INIT --- +# Set initial variables: +CWD=`pwd` +if [ "$TMP" = "" ]; then + TMP=/tmp +fi + +PRGNAM=vnc +VERSION=4_1_1 +DOCVER=4.0 +SUB=x86_linux +ARCH=i486 +BUILD=3 + +PKG=$TMP/package-$PRGNAM + +if [ ! -d $TMP/tmp-$PRGNAM ]; then + mkdir -p $TMP/tmp-$PRGNAM # location to build the source +fi +if [ ! -d $PKG ]; then + mkdir -p $PKG # place for the package to be built +fi + + +# --- PACKAGE BUILDING --- + + +echo "++" +echo "|| $PRGNAM-$VERSION" +echo "++" + +rm -rf $PKG/* + +# Explode the package framework: +cd $PKG +explodepkg $CWD/_$PRGNAM.tar.gz + +cd $TMP/tmp-$PRGNAM + +# +# Extract the tar ball, patch and modify +# +echo "Extracting the program tarball..." +tar -xzvf $CWD/${PRGNAM}-${VERSION}-${SUB}.tar.gz + +cd ${PRGNAM}-${VERSION}-${SUB} + +chown -R root.root * + +#cp -a Xvnc vncconnect vncpasswd vncserver vncviewer $PKG/usr/bin +#chmod 555 $PKG/usr/bin/* +#chgrp bin $PKG/usr/bin/* +./vncinstall $PKG/usr/bin $PKG/usr/man $PKG/usr/X11R6/lib/modules/extensions +chown root:bin $PKG/usr/bin/* + +cp -a java/* $PKG/usr/share/vnc/classes/ + +cp -a $CWD/Vncviewer.ad-$VERSION $PKG/usr/lib/X11/app-defaults/Vncviewer +chmod 444 $PKG/usr/lib/X11/app-defaults/Vncviewer + + +# --- DOCUMENTATION --- + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION + +# Unpack the separate documentation tarball +tar -C $TMP/tmp-$PRGNAM -xzvf $CWD/$PRGNAM-$DOCVER-documentation.tar.gz +mv $TMP/tmp-$PRGNAM/$PRGNAM-$DOCVER-documentation/* $PKG/usr/doc/$PRGNAM-$VERSION/ +cp -a LICENCE.txt README $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/install/README.1st $PKG/usr/doc/$PRGNAM-$VERSION +chown -R root.root $PKG/usr/doc/$PRGNAM-$VERSION/* +chmod -R a-ws $PKG/usr/doc/$PRGNAM-$VERSION/* + +# Compress the man pages +gzip -9f $PKG/usr/man/*/* + +# +# Patch vncserver : +# alternate default xstartup & enable rgb and font paths +# +sed -i \ + -e 's?^\( *"\)\(xterm -geometry 80x24+10+10 -ls -title \\"\\\$VNCDESKTOP Desktop\\" &\\n"\.\)$?\1#\2?' \ + -e "s#^\(.*\)\(\"twm &\\\n\");\)\$#\1\"xterm -geometry 124x24\+30\+30 -title \\\\\"VNC Startup Tip\\\\\" -e less /usr/doc/vnc-$VERSION/README\.1st \&\\\n\"\.\\ +\1\2#" \ + -e 's?# *\(\$cmd \.= " -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";\)?\1?' \ + -e 's?# *\(\$cmd \.= " -co /usr/lib/X11/rgb";\)?\1?' \ + $PKG/usr/bin/vncserver + + +# --- OWNERSHIP, RIGHTS --- + +chmod -R o-w $PKG + + +# --- PACKAGE DESCRIPTION --- + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + + +# --- BUILDING --- + +# Build the package: +cd $PKG +makepkg --linkadd y --chown n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz \ + | tee $CWD/makepkg.log +(cd $TMP && \ + md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > \ + $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5 +) +cat $CWD/slack-desc | grep "^${PRGNAM}" > \ + $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txt + + +# --- CLEANUP --- + +# Clean up the extra stuff: +if [ "$1" = "--cleanup" ]; then + rm -rf $TMP/tmp-$PRGNAM + rm -rf $PKG +fi |