#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-autofs 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 echo "+==============+" echo "| autofs-3.1.7 |" echo "+==============+" cd $TMP tar xyvf $CWD/autofs-3.1.7.tar.bz2 cd autofs-3.1.7 zcat $CWD/autofs-3.1.7.diff.gz | patch -p1 --verbose --backup --suffix=.orig -E mkdir -p $PKG/usr/doc/autofs-3.1.7 cp -a COPYING COPYRIGHT NEWS README README.options TODO \ multiserver_mount.patch samples $PKG/usr/doc/autofs-3.1.7 chown -R root.root $PKG/usr/doc/autofs-3.1.7 ./configure --prefix=/usr i386-slackware-linux make cd daemon mkdir -p $PKG/usr/sbin cat automount > $PKG/usr/sbin/automount chown root.bin $PKG/usr/sbin/automount chmod 755 $PKG/usr/sbin/automount cd ../modules mkdir -p $PKG/usr/lib/autofs for file in *.so ; do cat $file > $PKG/usr/lib/autofs/$file done cd ../man mkdir -p $PKG/usr/man/man5 $PKG/usr/man/man8 for file in *.5 ; do cat $file | gzip -9c > $PKG/usr/man/man5/$file.gz done for file in *.8 ; do cat $file | gzip -9c > $PKG/usr/man/man8/$file.gz done strip $PKG/usr/sbin/* chown -R root.bin $PKG/usr/sbin # Build the package: cd $PKG tar czvf $TMP/autofs.tgz . # Warn of zero-length files: for file in `find . -type f -print` ; do if [ "`filesize $file`" = "0" ]; then echo "WARNING: zero length file $file" fi if [ "`filesize $file`" = "20" ]; then echo "WARNING: possible empty gzipped file $file" fi done # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/autofs-3.1.7 rm -rf $PKG fi