summaryrefslogtreecommitdiffstats
path: root/academic/cap3/cap3.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/cap3/cap3.SlackBuild')
-rw-r--r--academic/cap3/cap3.SlackBuild53
1 files changed, 28 insertions, 25 deletions
diff --git a/academic/cap3/cap3.SlackBuild b/academic/cap3/cap3.SlackBuild
index 12ee761b1e..65359adf4b 100644
--- a/academic/cap3/cap3.SlackBuild
+++ b/academic/cap3/cap3.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for cap3
-# Copyright 2013-2016 Petar Petrov slackalaxy@gmail.com
+# Copyright 2013-2021 Petar Petrov slackalaxy@gmail.com
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,37 +22,43 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220405 bkw: Modified by SlackBuilds.org, BUILD=3: fix doc permissions.
+
+# 20220318 bkw: Modified by SlackBuilds.org: fix 32-bit build when ARCH
+# set to i586 or i686 in environment.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=cap3
VERSION=${VERSION:-20091029} # Use the last modification date as version
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i386 ;;
+ 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}
set -e
-if [ "$ARCH" != "i386" ] && [ "$ARCH" != "x86_64" ]; then
- printf "\n\n$ARCH is not supported... \n"
- exit 1
-fi
-
-# Determine the tarball arch
-if [ "$ARCH" = "x86_64" ]; then
- SRCARCH=".opteron64"
-else
- SRCARCH=""
-fi
+case "$ARCH" in
+ x86_64) SRCARCH=".x86_64" ;;
+ i?86) SRCARCH="" ;;
+ *) echo "Unsupported ARCH '$ARCH'"; exit 1 ;;
+esac
# Construct tarball name
TARNAME=${PRGNAM}.linux${SRCARCH}
@@ -67,18 +73,15 @@ cd $DIRNAM
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 \
+ -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-install -D -m755 $PRGNAM $PKG/usr/bin/$PRGNAM
-install -D -m755 formcon $PKG/usr/bin/formcon
+ -exec chmod 644 {} \+
-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
+install -s -D -m755 $PRGNAM $PKG/usr/bin/$PRGNAM
+install -s -D -m755 formcon $PKG/usr/bin/formcon
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
+install -m0644 \
aceform doc README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -89,4 +92,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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