summaryrefslogtreecommitdiffstats
path: root/audio/mpd/mpd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mpd/mpd.SlackBuild')
-rw-r--r--audio/mpd/mpd.SlackBuild99
1 files changed, 61 insertions, 38 deletions
diff --git a/audio/mpd/mpd.SlackBuild b/audio/mpd/mpd.SlackBuild
index d24d93c3b3..76589b526a 100644
--- a/audio/mpd/mpd.SlackBuild
+++ b/audio/mpd/mpd.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for mpd
@@ -23,10 +23,29 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220305 bkw: Modified by SlackBuilds.org:
+# - add fmt to REQUIRES. without this, it was dowloading the fmt source.
+
+# 20220218 bkw: Modified by SlackBuilds.org:
+# - build was failing if libmikmod or libupnp were installed, so I
+# updated to the latest version (0.23.5).
+# - the version update didn't fix it, so libmikmod and libupnp are
+# disabled now (via meson -D options).
+
+# Note to whoever's updating this script in the future: try removing
+# the -Dmikmod=disabled and/or -Dupnp=disabled options. Upstream may
+# fix the issue at some point.
+
+# 20200411 bkw: not taking this over, but I'm upgrading it to the latest
+# release as part of the migration to fluidsynth-2.x.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=mpd
-VERSION=${VERSION:-0.20.18}
+VERSION=${VERSION:-0.23.15}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -36,7 +55,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}
@@ -57,11 +80,11 @@ fi
set -e
-# zziplib support
-if [ "${ZZIPLIB:-no}" != "no" ]; then
- zziplib="enable"
+# undocumented, but allow disabling pulseaudio
+if [ "${PULSE:-yes}" = "yes" ]; then
+ PULSE="enabled"
else
- zziplib="disable"
+ PULSE="disabled"
fi
rm -rf $PKG
@@ -71,40 +94,40 @@ 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 {} \;
-
-#adding LDFLAGS="-lnsl" for libwrap, part of tcp_wrappers package
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-LDFLAGS="-L/usr/lib${LIBDIRSUFFIX} -lnsl" \
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --enable-documentation \
- --enable-database \
- --enable-pulse \
- --enable-iso9660 \
- --${zziplib}-zzip \
- --enable-cdio-paranoia \
- --disable-dependency-tracking \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-make
-make install DESTDIR=$PKG
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ LDFLAGS="-L/usr/lib${LIBDIRSUFFIX} -lnsl" \
+ meson .. \
+ -Dsystemd=disabled \
+ -Dpulse=$PULSE \
+ -Dupnp=disabled \
+ -Dmikmod=disabled \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+strip $PKG/usr/bin/$PRGNAM
+
+# 20200411 bkw: meson doesn't support --docdir
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
# Use sample config, without overwriting
install -D -m 644 doc/mpdconf.example $PKG/etc/mpd.conf.new
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+[ -d $PKG/usr/man ] && gzip -9 $PKG/usr/man/man*/*
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -113,4 +136,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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