#!/bin/sh # Set initial variables: CWD=`pwd` TMP=/tmp PKG=$TMP/package-mt-st VERSION=0.9b ARCH=alpha BUILD=1 mkdir -p $PKG # place for the package to be built cd $PKG explodepkg $CWD/_mt-st.tar.gz ( cd $TMP tar xzf $CWD/mt-st-$VERSION.tar.gz cd mt-st-$VERSION chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; zcat $CWD/mt-st.config.diff.gz | patch -p1 --verbose || exit zcat $CWD/mt-st.man.diff.gz | patch -p1 --verbose || exit zcat $CWD/mt-st.sdlt.diff.gz | patch -p1 --verbose || exit make || exit strip mt stinit cat mt > $PKG/bin/mt-st cat stinit > $PKG/sbin/stinit mkdir -p $PKG/usr/man/man{1,8} cat mt.1 | gzip -9c > $PKG/usr/man/man1/mt-st.1.gz cat stinit.8 | gzip -9c > $PKG/usr/man/man8/stinit.8.gz mkdir -p $PKG/usr/doc/mt-st-$VERSION cp -a COPYING README* *.lsm stinit.def.examples $PKG/usr/doc/mt-st-$VERSION chown -R root.root $PKG/usr/doc/mt-st-$VERSION chmod 644 $PKG/usr/doc/mt-st-$VERSION/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/mt-st-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/mt-st.build.log