summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-01-18 21:35:16 +0000
committer Eric Hameleers <alien@slackware.com>2020-01-18 21:35:16 +0000
commitf2c2b982c71bc1fd526c35aad63932284b0b323d (patch)
treea9ce6026eec0817e927c0be26cdd789b80002d4e
parent4b314c752386ab9bf8b6f15c9fe70cbfdcdf2fe0 (diff)
downloadasb-f2c2b982c71bc1fd526c35aad63932284b0b323d.tar.gz
asb-f2c2b982c71bc1fd526c35aad63932284b0b323d.tar.xz
Initial revision
-rwxr-xr-xpulseaudio-jack/build/pulseaudio-jack.SlackBuild168
-rw-r--r--pulseaudio-jack/build/slack-desc19
-rw-r--r--pulseaudio-jack/build/slack-required1
3 files changed, 188 insertions, 0 deletions
diff --git a/pulseaudio-jack/build/pulseaudio-jack.SlackBuild b/pulseaudio-jack/build/pulseaudio-jack.SlackBuild
new file mode 100755
index 00000000..15cf4d52
--- /dev/null
+++ b/pulseaudio-jack/build/pulseaudio-jack.SlackBuild
@@ -0,0 +1,168 @@
+#!/bin/bash
+
+# Slackware build script for pulseaudio-jack
+
+# Copyright 2015 Christoph Willing Brisbane, Australia
+# Copyright 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2019 by Eric Hameleers <alien@slackware.com> to build JACK support.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=pulseaudio-jack
+SRCNAM=pulseaudio
+VERSION=${VERSION:-12.2}
+BUILD=${BUILD:-1alien}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+case "$ARCH" in
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"-O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.xz || exit 1
+cd $SRCNAM-$VERSION || exit 1
+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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+cat $CWD/patches/020_no-parallel-make.diff | patch -p0 --verbose || exit 1
+cat $CWD/patches/030_posix-completion.diff | patch -p0 --verbose || exit 1
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=1234710
+cat $CWD/patches/0001-client-conf-Add-allow-autospawn-for-root.patch | patch -p1 --verbose || exit 1
+cat $CWD/patches/0002-allow-autospawn-for-root-default.diff | patch -p1 --verbose || exit 1
+
+# Do not log a warning every time root uses PulseAudio:
+cat $CWD/patches/0003-no-root-warn.diff | patch -p1 --verbose || exit 1
+
+sed -i -e '/@PA_BINARY@/ imkdir -p \$HOME/.config/pulse' src/daemon/start-pulseaudio-x11.in
+echo "X-MATE-Autostart-Phase=Initialization" >> src/daemon/pulseaudio.desktop.in
+
+# If autospawn isn't working, start-pulseaudio-x11 should start it manually:
+cat $CWD/patches/pulseaudio-autostart.patch | patch -p1 --verbose || exit 1
+
+# Disable "flat volumes" to work more like ALSA's mixer. POLA.
+# Have a google for "flat volumes" for more rationale on us not
+# using the upstream default here.
+sed -i 's/; flat-volumes = yes/flat-volumes = no/g' ./src/daemon/daemon.conf.in
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./bootstrap.sh \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-tcpwrap \
+ --enable-orc \
+ --disable-static \
+ --disable-hal-compat \
+ --disable-bluez4 \
+ --with-system-user=pulse \
+ --with-system-group=pulse \
+ --with-access-group=audio \
+ --with-bash-completion-dir=/usr/share/bash-completion/completions \
+ --build=$TARGET || exit 1
+
+make $NUMJOBS check || make check || exit 1
+make $NUMJOBS || make || exit 1
+# We manually install only the JACK support libraries:
+#make install-strip DESTDIR=$PKG || exit 1
+install -d $PKG/usr/lib${LIBDIRSUFFIX}/pulse-${VERSION}/modules
+install -m0755 src/.libs/module-jack*.so \
+ $PKG/usr/lib${LIBDIRSUFFIX}/pulse-${VERSION}/modules/
+
+# Remove .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/lib*.la
+
+# Install documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYING* *GPL LICENSE README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/slack-required > $PKG/install/slack-required
+# Not needed for the JACK libraries:
+#cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+cd $TMP
+ md5sum $PKGNAM-$VERSION-$ARCH-$BUILD.txz > $PKGNAM-$VERSION-$ARCH-$BUILD.txz.md5
+ cat $PKG/install/slack-desc | grep "^${PKGNAM}" > $PKGNAM-$VERSION-$ARCH-$BUILD.txt
+ cat $PKG/install/slack-required > $PKGNAM-$VERSION-$ARCH-$BUILD.dep
+cd -
+
diff --git a/pulseaudio-jack/build/slack-desc b/pulseaudio-jack/build/slack-desc
new file mode 100644
index 00000000..bd7d2d11
--- /dev/null
+++ b/pulseaudio-jack/build/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+pulseaudio-jack: pulseaudio-jack (JACK support for PulseAudio sound server)
+pulseaudio-jack:
+pulseaudio-jack: Pulseaudio is a networked low-latency sound server intended to be an
+pulseaudio-jack: improved replacement for the Enlightened Sound Daemon (EsounD).
+pulseaudio-jack: This package contains support for the JACK audio connection kit.
+pulseaudio-jack:
+pulseaudio-jack:
+pulseaudio-jack:
+pulseaudio-jack:
+pulseaudio-jack: Homepage: http://www.pulseaudio.org
+pulseaudio-jack:
diff --git a/pulseaudio-jack/build/slack-required b/pulseaudio-jack/build/slack-required
new file mode 100644
index 00000000..1efd7370
--- /dev/null
+++ b/pulseaudio-jack/build/slack-required
@@ -0,0 +1 @@
+jack2