#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=vnc VERSION=3.3.7 FILES=$(cd $(dirname $0) ; pwd) # for future build: # - extract documentation to source dir to simplify chmod/chown mkdir -p $PREPKG/{install,usr/{bin,doc,man/man1,share/$PACKAGE}}/ chmod -R go-w . chown -R root:root . CFLAGS="-O2 -march=i486 -mcpu=i686" CXXFLAGS="-O2 -march=i486 -mcpu=i686" \ ./configure \ --prefix=/usr \ --with-installed-zlib \ i486-slackware-linux &> configure.output || exit 1 make $MAKEJOBS &> make.output || exit 1 # based on XFree86 to the point that multiple jobs will cause the build to die # solution: ensure multiple jobs don't happen make -C Xvnc World CDEBUGFLAGS="-O2 -march=i486 -mcpu=i686" \ &> make_World.output || exit 1 cp -p Xvnc/programs/Xserver/Xvnc vncconnect/vncconnect vncpasswd/vncpasswd \ vncserver vncviewer/vncviewer $PREPKG/usr/bin/ chown -R root:bin $PREPKG/usr/bin/ cp -p Xvnc/programs/Xserver/Xvnc.man $PREPKG/usr/man/man1/Xvnc.1 cp -p vncconnect/vncconnect.man $PREPKG/usr/man/man1/vncconnect.1 cp -p vncpasswd/vncpasswd.man $PREPKG/usr/man/man1/vncpasswd.1 cp -p vncserver.man $PREPKG/usr/man/man1/vncserver.1 cp -p vncviewer/vncviewer.man $PREPKG/usr/man/man1/vncviewer.1 gzip -r9 $PREPKG/usr/man/ cp -a classes/ $PREPKG/usr/share/$PACKAGE/ tar -zxf $FILES/$PACKAGE-$VERSION-documentation.tar.gz -C $PREPKG/usr/doc/ mv $PREPKG/usr/doc/$PACKAGE-$VERSION-documentation/ \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ chmod -R go-w $PREPKG/usr/doc/$PACKAGE-$VERSION/ chown -R root:root $PREPKG/usr/doc/$PACKAGE-$VERSION/ cp -p LICENCE.TXT README \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ cp $FILES/slack-desc $PREPKG/install/ find $PREPKG -exec file {} \; \ | awk -F : '/ ELF / {print $1}' \ | xargs strip -p --strip-unneeded