summaryrefslogtreecommitdiffstats
path: root/libraries/libowfat/libowfat.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libowfat/libowfat.SlackBuild')
-rw-r--r--libraries/libowfat/libowfat.SlackBuild63
1 files changed, 24 insertions, 39 deletions
diff --git a/libraries/libowfat/libowfat.SlackBuild b/libraries/libowfat/libowfat.SlackBuild
index 6581c870ac..32a8ffd4ae 100644
--- a/libraries/libowfat/libowfat.SlackBuild
+++ b/libraries/libowfat/libowfat.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for libowfat
-# Copyright (c) 2010-2018 Markus Reichelt, Aachen, DE
+# Copyright (c) 2010-2023 Markus Reichelt, Aachen, DE
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -23,14 +23,17 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# Markus Reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
+# Markus Reichelt (email removed)
+# 20230708 bkw: BUILD=2
+# - new maintainer.
+# - allow DIET=no (because I will never remember to use uppercase NO).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libowfat
-VERSION=${VERSION:-0.32}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.33}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -42,9 +45,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,25 +54,13 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
- LIBARCH="i386"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
- LIBARCH="i386"
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- LIBARCH=$ARCH
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- LIBARCH="i386"
-fi
+# 20230708 bkw: why doesn't this just use lib and lib64? is it to comply
+# with some standard, or match some other distro's package? leave as-is
+# for now, pending investigation...
+LIBARCH="i386"
+[ "$ARCH" = "x86_64" -o "$ARCH" = "aarch64" ] && LIBARCH=$ARCH
-if [ "$DIET" = "NO" ]; then
+if [ "${DIET^^}" = "NO" ]; then
OPT="DIET="
else
OPT=""
@@ -87,36 +75,33 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
mkdir -p $PKG/opt/diet/man
-sed -i "s/CFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer/CFLAGS=$SLKCFLAGS/" GNUmakefile
-
+make headers
make Makefile
make $OPT
make install prefix=$PKG/opt/diet/ LIBDIR=$PKG/opt/diet/lib-$LIBARCH
+# 20230708 bkw: technically these profile scripts conflict with the
+# dietlibc package. However, they're identical in both packages, so
+# I don't see it as a problem.
mkdir -p $PKG/etc/profile.d
cat $CWD/profile.d/dietlibc.sh > $PKG/etc/profile.d/dietlibc.sh
cat $CWD/profile.d/dietlibc.csh > $PKG/etc/profile.d/dietlibc.csh
chmod 0755 $PKG/etc/profile.d/*
-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
-
#avoid possible conflict - have a look at /etc/man.conf
mv $PKG/opt/diet/man/man3/buffer.3 $PKG/opt/diet/man/man3/buffer-libowfat.3
-find $PKG/opt/diet/man -type f -exec gzip -9 {} \;
+gzip -9 $PKG/opt/diet/man/*/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES* COPYING* README* TODO* $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CHANGES* COPYING* README* TODO* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc