summaryrefslogtreecommitdiff
path: root/development/swig/swig.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/swig/swig.SlackBuild')
-rw-r--r--development/swig/swig.SlackBuild24
1 files changed, 10 insertions, 14 deletions
diff --git a/development/swig/swig.SlackBuild b/development/swig/swig.SlackBuild
index 508e44b7aa..8d66e67b9a 100644
--- a/development/swig/swig.SlackBuild
+++ b/development/swig/swig.SlackBuild
@@ -9,17 +9,12 @@
# Modified by the SlackBuilds.org project
-if [ "$(id -u)" != "0" ]; then
- echo "This script must be run as root!"
- exit
-fi
-
NAME=swig
VERSION=1.3.31
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-CWD=`pwd`
+CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=${PKG:-$TMP/package-$NAME}
OUTPUT=${OUTPUT:-/tmp}
@@ -29,7 +24,6 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
tar -zxvf $CWD/$NAME-$VERSION.tar.gz || exit 1
cd $NAME-$VERSION || exit 1
-
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -42,17 +36,19 @@ fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr \
- --exec-prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- || exit 1
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ || exit 1
make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-find $PKG | xargs file | grep "shared object" | 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
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a ANNOUNCE CHANGES* FUTURE INSTALL LICENSE NEW README TODO Examples/ \