summaryrefslogtreecommitdiffstats
path: root/misc/dwdiff/dwdiff.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/dwdiff/dwdiff.SlackBuild')
-rw-r--r--misc/dwdiff/dwdiff.SlackBuild30
1 files changed, 21 insertions, 9 deletions
diff --git a/misc/dwdiff/dwdiff.SlackBuild b/misc/dwdiff/dwdiff.SlackBuild
index 99485977fd..1a9690b08d 100644
--- a/misc/dwdiff/dwdiff.SlackBuild
+++ b/misc/dwdiff/dwdiff.SlackBuild
@@ -1,29 +1,39 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for dwdiff
# Written by slakmagik <slakmagik@gmail.com>
# Released under the WTFPL
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=dwdiff
-VERSION=${VERSION:-2.0.1}
+VERSION=${VERSION:-2.1.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# 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
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -49,7 +59,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -58,8 +68,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
+# Patch for configure --mandir
+patch -p1 < $CWD/config.pkg.patch
# Patch for a build failure if not building with unicode.
-patch -p1 < $CWD/doDiff.c.patch
+patch -p1 < $CWD/src-option.c.patch
# This is one messed up makefile - and its configure doesn't accept '--build'
CC="gcc -fgnu89-inline" \
@@ -88,4 +100,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE