aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/cnijfilter2/cnijfilter2.SlackBuild46
1 files changed, 30 insertions, 16 deletions
diff --git a/system/cnijfilter2/cnijfilter2.SlackBuild b/system/cnijfilter2/cnijfilter2.SlackBuild
index 6b29cf1e8c1d..afbb4ed782ae 100644
--- a/system/cnijfilter2/cnijfilter2.SlackBuild
+++ b/system/cnijfilter2/cnijfilter2.SlackBuild
@@ -33,23 +33,12 @@ PKGTYPE=${PKGTYPE:-tgz}
SRCNAM=$PRGNAM-source
SRCVERSION=6.20-1
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i586
- export SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- export LIBDIRSUFFIX=""
- BITS="i686";;
- x86_64) export ARCH=x86_64
- export SLKCFLAGS="-O2 -fPIC"
- export LIBDIRSUFFIX="64"
- BITS="x86_64" ;;
- aarch64) export ARCH=aarch64
- export SLKCFLAGS="-O2 -fPIC"
- export LIBDIRSUFFIX="64"
- BITS="aarch64" ;;
- *) echo "Package for $MARCH architecture is not available."
- exit 1 ;;
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ aarch64) ARCH=aarch64 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
esac
fi
@@ -65,6 +54,31 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ BITS="i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ BITS="i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ BITS="x86_64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ BITS="aarch64"
+else
+ echo "Package for $ARCH architecture is not available."
+ exit 1
+fi
+
+export ARCH
+export SLKCFLAGS
+export LIBDIRSUFFIX
+
set -e
rm -rf $PKG