summaryrefslogtreecommitdiffstats
path: root/system/opensc/opensc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/opensc/opensc.SlackBuild')
-rw-r--r--system/opensc/opensc.SlackBuild43
1 files changed, 25 insertions, 18 deletions
diff --git a/system/opensc/opensc.SlackBuild b/system/opensc/opensc.SlackBuild
index e7dc5c71e3..8c5a363c4c 100644
--- a/system/opensc/opensc.SlackBuild
+++ b/system/opensc/opensc.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for opensc
# Copyright 2008-2015 LukenShiro, Italy
+# Copyright 2018-2023 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,26 +23,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - add update-desktop-database to doinst.sh.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=opensc
-VERSION=${VERSION:-0.15.0}
+VERSION=${VERSION:-0.23.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCFILES="README COPYING NEWS ChangeLog"
-XSL_STYLESHEETS_VER=1.78.1
+DOCFILES="README COPYING NEWS"
+XSL_STYLESHEETS_VER=$(export LS_OPTIONS='' ; ls -1 /usr/share/xml/docbook/ | grep xsl-stylesheets- | cut -d- -f3)
# opensc now supports only one reader subsystem (pcsc-lite or openct)
OPENCT=${OPENCT:-0} # pcsc-lite is the default, openct disabled
@@ -51,8 +62,8 @@ case "$OPENCT" in
*) RDRSUBSYS_flags="--disable-pcsc --enable-openct" ;;
esac
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -76,9 +87,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# --enable-nsplugin and --with-pinentry= are no longer supported.
CFLAGS="$SLKCFLAGS" \
@@ -99,17 +110,13 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
+rm -f $PKG/usr/lib*/*.la
# Don't clobber the config file
mv $PKG/etc/opensc.conf $PKG/etc/opensc.conf.new
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -119,4 +126,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE