#!/bin/bash # svgalib.SlackBuild # Build a DUMMY svgalib for architectures which do not have SVGA support # or to which the real svgalib package has not been ported. # by Stuart Winter # 20-Nov-2004 # Record toolchain & other info for the build log: slackbuildinfo # Paths to skeleton port's source & real Slackware source tree: export CWD=$SLACKSOURCE/$PKGSERIES/$PACKAGE export PORTCWD=$PWD # Temporary build locations: export TMPBUILD=$TMP/build-$PACKAGE export PKG=$TMP/package-$PACKAGE mkpkgdirs # Delete & re-create temporary directories then cd into $TMPBUILD # Determine the CFLAGS for the known architectures: case $PORTARCH in arm) export ARCH_CFLAGS="-march=armv3 -mtune=xscale" ;; powerpc) export ARCH_CFLAGS="" ;; sparc) export ARCH_CFLAGS="" ;; *) export ARCH_CFLAGS="" ;; esac # Extract source: tar zxvvf $PORTCWD/sources/$PACKAGE-*.tar.gz cd $PACKAGE-* slackhousekeeping # Build: make CC="gcc $ARCH_CFLAGS" || failmake # Install: make install PREFIX=$PKG || failinstall # Copy some docs: mkdir -p $PKG/usr/doc/$PACKAGE-$VERSION cp -a debian/README.debian debian/changelog debian/copyright \ $PKG/usr/doc/$PACKAGE-$VERSION # Just so it's easier to identify: ( cd $PKG/usr/doc/* && ln -fs README.debian THIS_IS_A_DUMMY_PACKAGE ) # Insert the package description for the dummy version: mkdir $PKG/install install -m644 $PORTCWD/slack-desc.dummy $PKG/install/slack-desc # Slackware policies: cd $PKG slackgzpages -i # compress man & info pages and delete usr/info/dir slackslack # chown -R root:root, chmod -R og-w, slackchown (root:bin), slack644docs # Build the package: if [ $PORTARCH = arm ]; then . $PORTCWD/arm/pkger else makepkg -l y -c n $PKGSTORE/$PKGSERIES/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz fi # Perform any final checks on the package: cd $PKG slackhlinks # search for any hard links