summaryrefslogtreecommitdiffstats
path: root/system/pcsc-lite/pcsc-lite.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/pcsc-lite/pcsc-lite.SlackBuild')
-rw-r--r--system/pcsc-lite/pcsc-lite.SlackBuild27
1 files changed, 14 insertions, 13 deletions
diff --git a/system/pcsc-lite/pcsc-lite.SlackBuild b/system/pcsc-lite/pcsc-lite.SlackBuild
index c711cde649..57529c30e7 100644
--- a/system/pcsc-lite/pcsc-lite.SlackBuild
+++ b/system/pcsc-lite/pcsc-lite.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for pcsc-lite
# Copyright 2007-2015 LukenShiro, Italy
-# Copyright 2020-2021 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# Copyright 2020-2023 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,10 +23,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230801 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - handle user and group detection better.
+# - get rid of generic GNU INSTALL from doc dir.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pcsc-lite
-VERSION=${VERSION:-1.9.4}
+VERSION=${VERSION:-1.9.9}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,9 +43,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -54,12 +55,12 @@ OUTPUT=${OUTPUT:-/tmp}
# Bail out if user or group isn't valid on your system
# For slackbuilds.org, assigned pcscd uid/gid are 257/257
# See http://slackbuilds.org/uid_gid.txt
-if ! grep ^pcscd: /etc/group 2>&1 > /dev/null; then
- echo " You must have a \"pcscd\" group to run this script."
+# 20230801 bkw: grepping /etc/passwd and /etc/group may fail if e.g. NIS
+# or LDAP is in use; always use getent. Also, print both messages (for user
+# and group) if either doesn't exist.
+if ! getent group pcscd &>/dev/null || ! getent passwd pcscd &>/dev/null; then
+ echo " You must have a \"pcscd\" user and group to run this script."
echo " # groupadd -g 257 pcscd"
- exit 1
-elif ! grep ^pcscd: /etc/passwd 2>&1 > /dev/null; then
- echo " You must have a \"pcscd\" user to run this script."
echo " # useradd -u 257 -g pcscd -d /var/run/pcscd -s /bin/false pcscd"
exit 1
fi
@@ -70,7 +71,7 @@ DEBUGATR=${DEBUGATR:-0}
AUTOPOFF=${AUTOPOFF:-0} # disabled by default
# README and README.DAEMON are not useful and partly outdated.
-DOCFILES="SECURITY ChangeLog* COPYING HELP NEWS TODO AUTHORS INSTALL"
+DOCFILES="SECURITY ChangeLog* COPYING HELP NEWS TODO AUTHORS"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
@@ -97,9 +98,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 {} +
# ATR (answer to reset) debug parsing output
case "$DEBUGATR" in