summaryrefslogtreecommitdiffstats
path: root/development/erlang-otp/erlang-otp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/erlang-otp/erlang-otp.SlackBuild')
-rw-r--r--development/erlang-otp/erlang-otp.SlackBuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/development/erlang-otp/erlang-otp.SlackBuild b/development/erlang-otp/erlang-otp.SlackBuild
index bb1978409f..013b16842b 100644
--- a/development/erlang-otp/erlang-otp.SlackBuild
+++ b/development/erlang-otp/erlang-otp.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
## Written by halflife (vzdorovenco@yahoo.com)
@@ -20,10 +20,16 @@
# 28 November 2016 to reflect the use of README.md instead
# of README in upstream
+# 20220415 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - strip binaries/libraries.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=erlang-otp
-VERSION=${VERSION:-22.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-23.2}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
SRC_NAME_VERSION=otp_src_${VERSION}
DOC_NAME_VERSION=otp_doc_man_${VERSION}
@@ -36,9 +42,13 @@ if [ -z "$ARCH" ]; then
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=${PKG:-$TMP/package-$PRGNAM}
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
@@ -66,9 +76,9 @@ cd $SRC_NAME_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 {} \+
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -99,6 +109,9 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv COPYRIGHT README.md $PKG/usr/doc/$PRGNAM-$VERSION )
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+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
+
mv $PKG/usr/lib${LIBDIRSUFFIX}/erlang/man $PKG/usr
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
@@ -109,4 +122,4 @@ sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%g" $CWD/doinst.sh > \
$PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE