summaryrefslogtreecommitdiffstats
path: root/source/ap/pamixer/pamixer.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/pamixer/pamixer.SlackBuild')
-rwxr-xr-xsource/ap/pamixer/pamixer.SlackBuild42
1 files changed, 32 insertions, 10 deletions
diff --git a/source/ap/pamixer/pamixer.SlackBuild b/source/ap/pamixer/pamixer.SlackBuild
index 2309960c3..2cdbea4d5 100755
--- a/source/ap/pamixer/pamixer.SlackBuild
+++ b/source/ap/pamixer/pamixer.SlackBuild
@@ -1,8 +1,7 @@
#!/bin/bash
-# Slackware build script for pamixer
-
# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,8 +24,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=pamixer
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-11}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -67,7 +66,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -76,15 +75,38 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-sed -i "s,CXXFLAGS ?=,CXXFLAGS ?= \$(OPTFLAGS),g" Makefile
-make OPTFLAGS="$SLKCFLAGS" || exit 1
-
-mkdir -p $PKG/usr/bin
-cp -a pamixer $PKG/usr/bin
+# Configure, build, and install:
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+mkdir meson-build
+cd meson-build
+meson setup \
+ --prefix=/usr \
+ --libdir=lib${LIBDIRSUFFIX} \
+ --libexecdir=/usr/libexec \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --includedir=/usr/include \
+ --datadir=/usr/share \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --buildtype=release \
+ .. || exit 1
+ "${NINJA:=ninja}" $NUMJOBS || exit 1
+ DESTDIR=$PKG $NINJA install || exit 1
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Compress manual pages:
+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
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
COPYING* README* \