summaryrefslogtreecommitdiffstats
path: root/development/gtkdialog/gtkdialog.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/gtkdialog/gtkdialog.SlackBuild')
-rw-r--r--development/gtkdialog/gtkdialog.SlackBuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/development/gtkdialog/gtkdialog.SlackBuild b/development/gtkdialog/gtkdialog.SlackBuild
index 55594102ae..a178b20cae 100644
--- a/development/gtkdialog/gtkdialog.SlackBuild
+++ b/development/gtkdialog/gtkdialog.SlackBuild
@@ -1,13 +1,16 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gtkdialog
# Written by slakmagik <slakmagik@gmail.com>
# Released under the WTFPL
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gtkdialog
VERSION=${VERSION:-0.8.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -17,7 +20,14 @@ if [ -z "$ARCH" ]; then
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}
@@ -51,6 +61,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
+# Thanks Gentoo!
+patch -p1 < $CWD/gtkdialog-0.8.3-fno-common.patch
+
CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr --infodir=/usr/info
make
@@ -69,4 +82,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