#!/bin/sh # Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. VERSION=2.3.3 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-6} CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-dcron rm -rf $PKG mkdir -p $TMP $PKG # Explode the package framework: cd $PKG explodepkg $CWD/_dcron.tar.gz cd $TMP rm -rf dcron-$VERSION 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 || exit # Added signal handling/logging patch from TEMHOTA : zcat $CWD/dcron-$VERSION.diff2.gz | patch -p1 -E --verbose --backup || exit # 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 || exit # 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 || exit # Dcron reports wrong version: zcat $CWD/dcron-2.3.3.version.diff.gz | patch -p1 || exit # Keep dcron from improperly forking in some circumstances. # Thanks to Henrik Carlqvist for the patch. zcat $CWD/dcron.fork.diff.gz | patch -p1 make strip crond crontab cat crond > $PKG/usr/sbin/crond cat crontab > $PKG/usr/bin/crontab zcat $CWD/run-parts.gz > $PKG/usr/bin/run-parts cat crontab.1 | gzip -9c > $PKG/usr/man/man1/crontab.1.gz cat crond.8 | gzip -9c > $PKG/usr/man/man8/crond.8.gz cat $CWD/run-parts.8.gz > $PKG/usr/man/man8/run-parts.8.gz mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/dcron-$VERSION-$ARCH-$BUILD.txz