summaryrefslogtreecommitdiff
path: root/system/unace/unace.SlackBuild
diff options
context:
space:
mode:
authorJeremy Hansen <jebrhansen+SBo@gmail.com>2017-07-27 15:37:31 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-07-28 06:11:09 +0700
commit2dba9ae32d1962a7bc4f5ccb1c6e7d78e27880fa (patch)
treecccdd9624d054b7020708751fefd0405c85da4b3 /system/unace/unace.SlackBuild
parent11d48a3658a2a05ea588bed2ca909dd7af021c12 (diff)
downloadslackbuilds-2dba9ae32d1962a7bc4f5ccb1c6e7d78e27880fa.tar.gz
system/unace: New maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/unace/unace.SlackBuild')
-rw-r--r--system/unace/unace.SlackBuild38
1 files changed, 35 insertions, 3 deletions
diff --git a/system/unace/unace.SlackBuild b/system/unace/unace.SlackBuild
index 88a6f8d1e3..da0c5f360e 100644
--- a/system/unace/unace.SlackBuild
+++ b/system/unace/unace.SlackBuild
@@ -2,6 +2,7 @@
#
# Slackware build script for unace
#
+# Copyright 2017 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
# All rights reserved.
#
@@ -24,15 +25,36 @@
PRGNAM=unace
VERSION=${VERSION:-2.5}
-ARCH=i586 # Static Binary
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
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 -eu
rm -rf $PKG
@@ -41,7 +63,8 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
-tar xvf $CWD/lin${PRGNAM}${VERSION/./}.tgz
+tar xvf $CWD/${PRGNAM}-nonfree_${VERSION}.orig.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -49,6 +72,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Thanks to AUR for the patches
+patch -p1 < $CWD/01-makefiles.dpatch
+
+if [ "$ARCH" = "x86_64" ]; then
+ patch -p1 < $CWD/04-64bit.dpatch
+fi
+
+make
+
mkdir -p $PKG/usr/bin
install -m 0755 unace $PKG/usr/bin/unace