diff options
Diffstat (limited to 'system/a2tools/a2tools.SlackBuild')
-rw-r--r-- | system/a2tools/a2tools.SlackBuild | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/system/a2tools/a2tools.SlackBuild b/system/a2tools/a2tools.SlackBuild index 6e0aa3abc4..7688d71525 100644 --- a/system/a2tools/a2tools.SlackBuild +++ b/system/a2tools/a2tools.SlackBuild @@ -2,15 +2,17 @@ # Slackware build script for a2tools -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20230601 bkw: BUILD=2, fix compiler warnings. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=a2tools VERSION=${VERSION:-003} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +24,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -36,16 +35,12 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -e @@ -54,19 +49,18 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM -unzip $CWD/$PRGNAM-v$VERSION.zip +unzip $CWD/$PRGNAM-v$VERSION.zip -x '*.exe' '*.dos' '*.csh' cd $PRGNAM chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +chmod 644 * + +# 20230531 bkw: fix a couple of (probably harmless) compiler warnings. +patch -p1 < $CWD/fix_warnings.diff # It doesn't come with a Makefile, it comes with a csh script. Don't # use it... -gcc $SLKCFLAGS -DUNIX -Wall -o $PRGNAM $PRGNAM.c +${CC:-gcc} $SLKCFLAGS -DUNIX -Wall -o $PRGNAM $PRGNAM.c mkdir -p $PKG/usr/bin $PKG/usr/man/man6 install -s -m0755 $PRGNAM $PKG/usr/bin gzip -9c < $PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz @@ -76,9 +70,10 @@ for link in a2ls a2in a2out a2rm; do ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$link.6.gz done -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a LICENSE README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |