aboutsummaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-18 12:34:48 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-20 20:45:14 +0700
commit964371efb11f34c4fe75f3aabdff6cbae750a356 (patch)
treef4c75f07777810da584e835e90cfe342395c5851 /academic
parentba7ef55c920c56314e89d578c4c1a920eaea3ac0 (diff)
academic/cap3: Fix 32-bit build when ARCH set in environment.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/cap3/cap3.SlackBuild35
-rw-r--r--academic/cap3/cap3.info2
2 files changed, 14 insertions, 23 deletions
diff --git a/academic/cap3/cap3.SlackBuild b/academic/cap3/cap3.SlackBuild
index 2229bdd2d6f33..e140b2a99f51f 100644
--- a/academic/cap3/cap3.SlackBuild
+++ b/academic/cap3/cap3.SlackBuild
@@ -22,6 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 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
@@ -32,15 +35,12 @@ 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
-# 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
@@ -52,17 +52,11 @@ 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=".x86_64"
-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}
@@ -77,15 +71,12 @@ 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 \
diff --git a/academic/cap3/cap3.info b/academic/cap3/cap3.info
index 0ac9937cbec4a..499a2d4859109 100644
--- a/academic/cap3/cap3.info
+++ b/academic/cap3/cap3.info
@@ -1,7 +1,7 @@
PRGNAM="cap3"
VERSION="20091029"
HOMEPAGE="http://seq.cs.iastate.edu/"
-DOWNLOAD="http://seq.cs.iastate.edu/CAP3/cap3.linux.tar"
+DOWNLOAD="https://slackware.uk/~urchlay/src/cap3.linux.tar"
MD5SUM="55f57f61e588d4de06c0506cf2696c29"
DOWNLOAD_x86_64="http://seq.cs.iastate.edu/CAP3/cap3.linux.x86_64.tar"
MD5SUM_x86_64="5393d937978ecc5f18fcb741140e1f02"