diff options
Diffstat (limited to 'network/hylafax/hylafax.SlackBuild')
-rw-r--r-- | network/hylafax/hylafax.SlackBuild | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/network/hylafax/hylafax.SlackBuild b/network/hylafax/hylafax.SlackBuild index 7c17482d2cf43..4ec163c7f9f0a 100644 --- a/network/hylafax/hylafax.SlackBuild +++ b/network/hylafax/hylafax.SlackBuild @@ -30,10 +30,11 @@ set -e PRGNAM=hylafax -VERSION=4.4.0 +VERSION=4.4.4 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -43,20 +44,26 @@ if [ "${ARCH}" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi -rm -rf ${PKG} -mkdir -p ${TMP} ${PKG} ${OUTPUT} -cd ${TMP} -rm -rf ${PRGNAM}-${VERSION} -tar -xvf ${CWD}/${PRGNAM}-${VERSION}.tar.gz +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd ${PRGNAM}-${VERSION} +cd $PRGNAM-$VERSION chown -R root:root . -chmod -R a-s,u+w,go+r-w . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; # Copy our source for the correct configuration -cp $CWD/config.local ${TMP}/${PRGNAM}-${VERSION}/config.local +cp $CWD/config.local $TMP/$PRGNAM-$VERSION/config.local CFLAGS="${SLKCFLAGS}" \ CXXFLAGS="${SLKCFLAGS}" \ @@ -66,36 +73,36 @@ CXXFLAGS="${SLKCFLAGS}" \ --with-optmizer=${CFLAGS} make -mkdir -p ${PKG}/etc/rc.d -make install ROOT=${PKG} +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 +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 +( 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 ) # Compress man pages -( cd ${PKG}/usr/man +( 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 ) -cat ${CWD}/${PRGNAM}.SlackBuild > ${PKG}/usr/doc/${PRGNAM}-${VERSION}/${PRGNAM}.SlackBuild -cat ${CWD}/slack-desc > ${PKG}/usr/doc/${PRGNAM}-${VERSION}/slack-desc +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/slack-desc > $PKG/usr/doc/$PRGNAM-$VERSION/slack-desc -mkdir -p ${PKG}/install -cat ${CWD}/slack-desc > ${PKG}/install/slack-desc +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc # add a configuration notice -cat << EOF >> ${PKG}/install/doinst.sh +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, " @@ -105,5 +112,5 @@ echo "m0:23:respawn:/usr/libexec/hylafax/faxgetty ttyS0" # Hylafax faxgetty activation EOF -cd ${PKG} -/sbin/makepkg -l y -c n ${OUTPUT}/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |