summaryrefslogtreecommitdiffstats
path: root/audio/mpc/mpc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mpc/mpc.SlackBuild')
-rw-r--r--audio/mpc/mpc.SlackBuild57
1 files changed, 33 insertions, 24 deletions
diff --git a/audio/mpc/mpc.SlackBuild b/audio/mpc/mpc.SlackBuild
index 3b38225fd8..0fe394195b 100644
--- a/audio/mpc/mpc.SlackBuild
+++ b/audio/mpc/mpc.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/bash
# Slackware build script for mpc
-# Originally Written by meckafett tom[DOT]bradish[AT]gmail.com
-# Copyright 2014 Luka Novsak
+
+# Copyright 2022-2024 Eugene M., <damagedone at gmx dot com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mpc
-VERSION=${VERSION:-0.27}
+VERSION=${VERSION:-0.35}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +38,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
@@ -60,7 +57,7 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O4"
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
@@ -70,35 +67,47 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xf $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 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --datarootdir=/usr \
- --localstatedir=/var
-
-make
-make install DESTDIR=$PKG
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+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
-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
+[ -d $PKG/usr/share/man ] && mv $PKG/usr/share/man $PKG/usr/man && gzip -9 $PKG/usr/man/man*/*
+
+find $PKG -name perllocal.pod \
+ -o -name ".packlist" \
+ -o -name "*.bs" \
+ | xargs rm -f
-mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/share/doc/mpc/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc