summaryrefslogtreecommitdiffstats
path: root/libraries/libgusb/libgusb.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libgusb/libgusb.SlackBuild')
-rw-r--r--libraries/libgusb/libgusb.SlackBuild42
1 files changed, 26 insertions, 16 deletions
diff --git a/libraries/libgusb/libgusb.SlackBuild b/libraries/libgusb/libgusb.SlackBuild
index 83def17a29..519a936acf 100644
--- a/libraries/libgusb/libgusb.SlackBuild
+++ b/libraries/libgusb/libgusb.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libgusb
-# Copyright 2016-2017 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
+# Copyright 2016-2024 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libgusb
-VERSION=${VERSION:-0.2.11}
+VERSION=${VERSION:-0.4.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,11 @@ 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=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,20 +76,23 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
+mkdir -p build
+cd build
+ meson setup \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
+ --buildtype=release \
+ --libdir=lib${LIBDIRSUFFIX} \
+ --libexecdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- --build=$ARCH-slackware-linux
+ -Ddocs=false \
+ ..
+
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
-make
-make install DESTDIR=$PKG
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
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
@@ -97,4 +107,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE