summaryrefslogtreecommitdiff
path: root/network/deluge/deluge.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/deluge/deluge.SlackBuild')
-rw-r--r--network/deluge/deluge.SlackBuild19
1 files changed, 13 insertions, 6 deletions
diff --git a/network/deluge/deluge.SlackBuild b/network/deluge/deluge.SlackBuild
index 77218bb3c9..d2229da11e 100644
--- a/network/deluge/deluge.SlackBuild
+++ b/network/deluge/deluge.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=deluge
VERSION=${VERSION:-1.2.0}
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -41,6 +50,8 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
set -e
@@ -61,7 +72,6 @@ find . \
-exec chmod 644 {} \;
python setup.py build || exit 1
-
python setup.py install --root=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
@@ -70,10 +80,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
mkdir -p $PKG/usr/man
mv $PKG/usr/share/man/man1 $PKG/usr/man
rm -r $PKG/usr/share/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
-)
+find $PKG -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION