diff options
Diffstat (limited to 'system/pmdk/pmdk.SlackBuild')
-rw-r--r-- | system/pmdk/pmdk.SlackBuild | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/system/pmdk/pmdk.SlackBuild b/system/pmdk/pmdk.SlackBuild index 3c15f7a4aa..aaaf5c1c17 100644 --- a/system/pmdk/pmdk.SlackBuild +++ b/system/pmdk/pmdk.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for pmdk -# Copyright 2022 Vijay Marcel +# Copyright 2022-2024 Vijay Marcel # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,18 +25,16 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pmdk -VERSION=${VERSION:-1.12.0} +VERSION=${VERSION:-1.13.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +sys_arch=${sys_arch:-$(uname -m)} -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i586 ;; - arm*) export ARCH=arm ;; - *) export ARCH=$( uname -m ) ;; - esac -fi +case "$sys_arch" in + x86_64) export ARCH=x86_64 ;; + *) echo "This program will not build on $sys_arch platform" && exit 1 ;; +esac # 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 @@ -46,23 +44,15 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" +if [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC" LIBDIRSUFFIX="64" else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + echo "This program will not build in this $sys_arch platform" && exit 1 fi set -e @@ -93,10 +83,14 @@ make -C doc all make -C doc install DESTDIR=$PKG/usr/man/ # Don't ship .la files: -rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la +rm -rvf $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +# Remove static libs + +rm -rvf $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.a 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 + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true mv -v $PKG/usr/etc $PKG/etc mv -v $PKG/usr/man/usr/local/share/man/* $PKG/usr/man/ |