diff options
Diffstat (limited to 'network/hylafax/hylafax.SlackBuild')
-rw-r--r-- | network/hylafax/hylafax.SlackBuild | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/network/hylafax/hylafax.SlackBuild b/network/hylafax/hylafax.SlackBuild index 4ec163c7f9f0a..d6fbdc98c3fe2 100644 --- a/network/hylafax/hylafax.SlackBuild +++ b/network/hylafax/hylafax.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for hylafax -# Copyright 2007 David Somero <dsomero@hotmail.com> +# Copyright 2007 David Somero (dsomero@hotmail.com) Athens,TN USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,18 +21,15 @@ # 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. -# + # 2007.08.07 # Alan Hicks <alan@lizella.net> # General script clean-up and minor improvements -# - -set -e PRGNAM=hylafax -VERSION=4.4.4 +VERSION=${VERSION:-6.0.2} ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -40,20 +37,24 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "${ARCH}" = "i486" ]; then +if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz - cd $PRGNAM-$VERSION chown -R root:root . find . \ @@ -63,54 +64,52 @@ find . \ -exec chmod 644 {} \; # Copy our source for the correct configuration -cp $CWD/config.local $TMP/$PRGNAM-$VERSION/config.local +sed "s|@LIBDIRSUFFIX@|${LIBDIRSUFFIX}|g" \ + < $CWD/config.local.in \ + > $TMP/$PRGNAM-$VERSION/config.local CFLAGS="${SLKCFLAGS}" \ CXXFLAGS="${SLKCFLAGS}" \ -./configure \ +./configure \ + --target=$ARCH-slackware-linux \ --nointeractive \ - --disable-pam \ + --disable-pam \ --with-optmizer=${CFLAGS} make mkdir -p $PKG/etc/rc.d make install ROOT=$PKG -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a INSTALL COPYRIGHT CONTRIBUTORS README TODO VERSION doc/* $PKG/usr/doc/$PRGNAM-$VERSION -chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* - -# We need to move the etc/rc.d/hylafax to the rc.hylafax file and make it executable. -mv $PKG/etc/rc.d/hylafax $PKG/etc/rc.d/rc.hylafax -chmod 755 $PKG/etc/rc.d/rc.hylafax - -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true # Compress man pages ( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) +mv $PKG/etc/rc.d/hylafax $PKG/etc/rc.d/rc.hylafax.new +( cd $PKG/var/spool/hylafax/etc + mv dialrules dialrules.new + mv dialrules.europe dialrules.europe.new + mv dialrules.sf-ba dialrules.sf-ba.new + mv dpsprinter.ps dpsprinter.ps.new + mv hosts.hfaxd hosts.hfaxd.new +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + INSTALL COPYRIGHT CONTRIBUTORS README TODO VERSION doc/* \ + $PKG/usr/doc/$PRGNAM-$VERSION +sed "s%@VERSION@%$VERSION%g" $CWD/README.SLACKWARE > \ + $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -cat $CWD/slack-desc > $PKG/usr/doc/$PRGNAM-$VERSION/slack-desc +chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc - -# add a configuration notice -cat << EOF >> $PKG/install/doinst.sh -# We warn about needed configuration to the /etc/inittab file. -echo "The following line will need be added to your /etc/inittab," -echo "please check if its the correct tty device for the modem, " -echo "and in case change it to the correct one." -echo " " -echo "m0:23:respawn:/usr/libexec/hylafax/faxgetty ttyS0" -# Hylafax faxgetty activation -EOF +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |