#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-dvd+rw-tools # Why do people do things like this? VERSION=7.0 PKGVER=7.0 DIRVER=7.0 ARCH=${ARCH:-i486} BUILD=2 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi # place for the package to be built rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf dvd+rw-tools-$VERSION tar xzvf $CWD/dvd+rw-tools-$VERSION.tar.gz || exit 1 cd dvd+rw-tools-$DIRVER chown -R root:root . zcat $CWD/dvd+rw-tools-7.0-phys.patch.gz | patch -p1 --verbose || exit 1 zcat $CWD/dvd+rw-tools-7.0-pthread.patch.gz | patch -p1 --verbose || exit 1 make -j4 || exit 1 mkdir -p $PKG/usr/bin cat dvd+rw-booktype > $PKG/usr/bin/dvd+rw-booktype cat dvd+rw-format > $PKG/usr/bin/dvd+rw-format cat dvd+rw-mediainfo > $PKG/usr/bin/dvd+rw-mediainfo cat dvd-ram-control > $PKG/usr/bin/dvd-ram-control cat growisofs > $PKG/usr/bin/growisofs strip $PKG/usr/bin/* chmod 755 $PKG/usr/bin/* mkdir -p $PKG/usr/man/man1 cat growisofs.1 | gzip -9c > $PKG/usr/man/man1/growisofs.1.gz mkdir -p $PKG/usr/doc/dvd+rw-tools-$VERSION cp -a \ index.html \ LICENSE \ $PKG/usr/doc/dvd+rw-tools-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/dvd+rw-tools-$PKGVER-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/dvd+rw-tools-$VERSION rm -rf $PKG fi