#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-dcron VERSION=2.3.3 ARCH=i386 BUILD=4 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi # Explode the package framework: cd $PKG explodepkg $CWD/_dcron.tar.gz echo "+=============+" echo "| dcron-$VERSION |" echo "+=============+" cd $TMP tar xzvf $CWD/dcron-$VERSION.tar.gz cd dcron-$VERSION mkdir -p $PKG/usr/doc/dcron-$VERSION cp -a CHANGES README dcron-$VERSION.lsm $PKG/usr/doc/dcron-2.3.3 chown root.root $PKG/usr/doc/dcron-$VERSION/* chmod 644 $PKG/usr/doc/dcron-$VERSION/* zcat $CWD/dcron-$VERSION.diff.gz | patch -p1 -E --verbose --backup # Added signal handling/logging patch from TEMHOTA : zcat $CWD/dcron-$VERSION.diff2.gz | patch -p1 -E --verbose --backup # Use /usr/sbin/sendmail, not /usr/lib/sendmail. Fixes cron working # with Postfix. Suggested by Big Brother. zcat $CWD/dcron-$VERSION.diff3.gz | patch -p1 -E --verbose --backup # Fix problem where user creates /var/spool/cron/crontabs/.new # using 'crontab -', exits with control-c, and then crontab refuses to # overwrite the junk file: zcat $CWD/dcron-$VERSION.crontab.diff4.gz | patch -p1 -E --verbose --backup # Dcron reports wrong version: zcat $CWD/dcron-2.3.3.version.diff.gz | patch -p1 make strip crond crontab cat crond > $PKG/usr/sbin/crond cat crontab > $PKG/usr/bin/crontab cat crontab.1 | gzip -9c > $PKG/usr/man/man1/crontab.1.gz cat crond.8 | gzip -9c > $PKG/usr/man/man8/crond.8.gz mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG echo "n" | makepkg $TMP/dcron-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/dcron-$VERSION rm -rf $PKG fi