system/zarfy: Fix 15.0 build.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-08 16:02:36 -05:00 committed by Willy Sudiarto Raharjo
parent 63ab00c61d
commit c19bd65827
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -23,26 +23,24 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Maintained by Marc Dix
# Modified by SlackBuilds.org project, 20220208 bkw, BUILD=4
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=zarfy
VERSION=${VERSION:-0.1.0}
BUILD=${BUILD:-3}
BUILD=${BUILD:-4}
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
# 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,8 +50,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
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"
@ -84,6 +82,8 @@ find -L . \
patch -p0 < $CWD/patch-makefile-in
patch -p0 < $CWD/patch-src-makefile-in
SLKCFLAGS+=" -fcommon"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-lm -lX11" \
@ -98,16 +98,13 @@ LDFLAGS="-lm -lX11" \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
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
make install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man*/*
# 20220208 bkw: do not install INSTALL (useless), NEWS, or AUTHORS
# (zero-byte placeholders).
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING ChangeLog README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install