#!/bin/bash # Slackware build script for schedtool # Written by Dave Margell. # Thanks to Robby Workman for help with the Makefile patch. # Modified and now maintained by B. Watson . # Original had no license. Modified version is licensed under the # WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20260708 bkw, BUILD=2: # - take over maintenance. # This is old, but looks too useful to get rid of. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=schedtool VERSION=${VERSION:-1.3.0} BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" fi set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . find . ! -type l -a \ \( -perm /111 -a ! -perm 755 -a -exec chmod -f 755 {} + \) -o \ \( ! -perm /111 -a ! -perm 644 -a -exec chmod -f 644 {} + \) DOC=/usr/doc/$PRGNAM-$VERSION PKGDOC=$PKG/$DOC patch -p1 < $CWD/schedtool-Makefile.patch make install \ OPT="$SLKCFLAGS" \ PREFIX=/usr \ MANDIR=/usr/man \ DOCDIR=$DOC \ DESTDIR=$PKG strip $PKG/usr/bin/$PRGNAM # 20260708 bkw: INSTALL was installed, above. Unlike most builds, # it actually has useful (but dated) information. # PACKAGERS isn't useful. cp -a CHANGES TODO TUNING $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE