aboutsummaryrefslogtreecommitdiff
path: root/system/opensc-ceres/opensc-ceres.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/opensc-ceres/opensc-ceres.SlackBuild')
-rw-r--r--system/opensc-ceres/opensc-ceres.SlackBuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/system/opensc-ceres/opensc-ceres.SlackBuild b/system/opensc-ceres/opensc-ceres.SlackBuild
index 2e2fafb91dea2..e30b793747e8d 100644
--- a/system/opensc-ceres/opensc-ceres.SlackBuild
+++ b/system/opensc-ceres/opensc-ceres.SlackBuild
@@ -5,11 +5,18 @@
# Based on scripts by the SlackBuilds.org project
PRGNAM=opensc-ceres
-VERSION=2.1.1
-ARCH=${ARCH:-i386}
+VERSION=2.3.2
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i386 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -17,16 +24,19 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "x86_64" ]; then
TARGET="x86_64"
-else
+elif [ "$ARCH" = "i386" ]; then
TARGET="x86"
+else
+ printf "$ARCH is not supported.\n"
+ exit 1
fi
if [ "$TARGET" = "x86" ]; then
SRCFILE=Debian_Lenny_32bits.zip
- SRCDEB=${PRGNAM}_$(echo $VERSION | tr "_" "-")_i386.deb
+ SRCDEB=${PRGNAM}_${VERSION}_i386.deb
elif [ "$TARGET" = "x86_64" ]; then
SRCFILE=Debian_Lenny_64bits.zip
- SRCDEB=${PRGNAM}_$(echo $VERSION | tr "_" "-")_amd64.deb
+ SRCDEB=${PRGNAM}_${VERSION}-1_amd64.deb
fi
set -e
@@ -35,7 +45,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
-unzip -j $CWD/$SRCFILE */$SRCDEB
+unzip -j $CWD/$SRCFILE $SRCDEB
ar x $SRCDEB data.tar.gz
tar xzf data.tar.gz
rm $SRCDEB data.tar.gz