#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-xv VERSION=3.10a ARCH=${ARCH:-x86_64} BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf xv-3.10 tar xzvf $CWD/xv-3.10.tar.gz cd xv-3.10 chown -R root:root . zcat $CWD/xv-3.10a.patch.gz | patch -p0 --verbose --backup --suffix=.orig || exit bzcat $CWD/xv-3.10a-jumbo-fix-patch-20050410.txt.bz2 | patch -p1 --verbose --backup --suffix=.orig || exit bzcat $CWD/xv-3.10a-jumbo-enh-patch-20050501.txt.bz2 | patch -p1 --verbose --backup --suffix=.orig || exit zcat $CWD/xv.prefix.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit make -f Makefile.std strip --strip-unneeded bggen vdcomp xcmap xv xvpictoppm mkdir -p $PKG/usr/X11R6/bin cat bggen > $PKG/usr/X11R6/bin/bggen cat vdcomp > $PKG/usr/X11R6/bin/vdcomp cat xcmap > $PKG/usr/X11R6/bin/xcmap cat xv > $PKG/usr/X11R6/bin/xv cat xvpictoppm > $PKG/usr/X11R6/bin/xvpictoppm chmod 755 $PKG/usr/X11R6/bin/* mkdir -p $PKG/usr/X11R6/man/man1 for page in docs/xv.man docs/bggen.man docs/xcmap.man docs/xvp2p.man ; do cat $page | gzip -9c > $PKG/usr/X11R6/man/man1/`basename $page .man`.1.gz done mkdir -p $PKG/usr/doc/xv-3.10a cp -a \ BUGS IDEAS INSTALL README README.jumbo README.pcd \ $PKG/usr/doc/xv-3.10a ( cd docs cp -a \ penn.policy xv.blurb xv.ann xvdocs.ps \ $PKG/usr/doc/xv-3.10a bzip2 -9 $PKG/usr/doc/xv-3.10a/xvdocs.ps ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/xv-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/xv-3.10 rm -rf $PKG fi