#!/bin/sh # Set initial variables: PKGNAM=mt-st VERSION=${VERSION:-0.9b} BUILD=${BUILD:-2} . /etc/pkghelpers pkghelpers_env rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf mt-st-$VERSION tar xzvf $CWD/mt-st-$VERSION.tar.gz cd mt-st-$VERSION zcat $CWD/mt-st.config.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/mt-st.man.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/mt-st.sdlt.diff.gz | patch -p1 --verbose || exit 1 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 {} \; # Enforce clue sed -i 's##"qic117.h"#' mtio.h || exit 1 # Build make || exit 1 strip mt stinit mkdir -p $PKG/bin cat mt > $PKG/bin/mt-st chmod 755 $PKG/bin/mt-st ( cd $PKG/bin ; ln -sf mt-st mt ) mkdir -p $PKG/sbin cat stinit > $PKG/sbin/stinit chmod 755 $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 mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG pkghelpers_fixup pkghelpers_makepkg