diff options
author | Eric Hameleers <alien@slackware.com> | 2020-09-26 19:21:19 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-09-26 19:21:19 +0000 |
commit | 763c7c5b7a698c608b066857db0b2e5427ca86d6 (patch) | |
tree | 49a5285208912841ecaddeb665062a326494302e /pipewire-jack | |
parent | 9f4e7d637aa0dbe7749294a904524cc698f554fb (diff) | |
download | asb-763c7c5b7a698c608b066857db0b2e5427ca86d6.tar.gz asb-763c7c5b7a698c608b066857db0b2e5427ca86d6.tar.xz |
Initial revision
Diffstat (limited to 'pipewire-jack')
-rwxr-xr-x | pipewire-jack/build/pipewire-jack.SlackBuild | 143 | ||||
-rw-r--r-- | pipewire-jack/build/slack-desc | 20 | ||||
-rw-r--r-- | pipewire-jack/build/slack-required | 1 |
3 files changed, 164 insertions, 0 deletions
diff --git a/pipewire-jack/build/pipewire-jack.SlackBuild b/pipewire-jack/build/pipewire-jack.SlackBuild new file mode 100755 index 00000000..a010455f --- /dev/null +++ b/pipewire-jack/build/pipewire-jack.SlackBuild @@ -0,0 +1,143 @@ +#!/bin/sh + +# Copyright 2020 Eric Hameleers, Eindhoven, NL +# All rights reserved. +# +# Permission to use, copy, modify, and distribute this software for +# any purpose with or without fee is hereby granted, provided that +# the above copyright notice and this permission notice appear in all +# copies. +# +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR +# CONTRIBUTORS 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. +# ----------------------------------------------------------------------------- + + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=pipewire-jack +SRCNAM=pipewire +VERSION=${VERSION:-0.3.8} +BUILD=${BUILD:-1} +TAG=${TAG:-alien} + +# 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 + +case "$ARCH" in + i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; + x86_64) SLKCFLAGS="-O2 -fPIC" + SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" + ;; + arm*) SLKCFLAGS="-O2" + SLKLDFLAGS=""; LIBDIRSUFFIX="" + ;; + *) SLKCFLAGS=${SLKCFLAGS:-"O2"} + SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} + ;; +esac + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM +SCRATCH=$TMP/tmp-$PKGNAM + +rm -rf $PKG $SCRATCH +mkdir -p $TMP $PKG $SCRATCH + +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 || exit 1 +cd $SRCNAM-$VERSION || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -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 {} \+ + +export LDFLAGS="$SLKLDFLAGS" +export CXXFLAGS="$SLKCFLAGS" +export CFLAGS="$SLKCFLAGS" +mkdir meson-build +cd meson-build + meson setup \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --buildtype=release \ + -Djack=true \ + -Dpipewire-jack=true \ + .. || exit 1 + + # Build and install to a scratch directory: + "${NINJA:=ninja}" $NUMJOBS || exit 1 + DESTDIR=$SCRATCH $NINJA install || exit 1 +cd .. + +# Move anything related to JACK into the package directory: +cd $SCRATCH +cp -a --parents usr/bin/pw-jack $PKG/ +cp -a --parents usr/lib${LIBDIRSUFFIX}/pipewire-*/jack $PKG/ +cp -a --parents usr/lib${LIBDIRSUFFIX}/spa-*/jack $PKG/ + +# ... and back to the source directory: +cd $TMP/$SRCNAM-$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 documentation: +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + CODE_OF_CONDUCT.md COPYING INSTALL.md LICENSE NEWS PROTOCOL README.md \ + $PKG/usr/doc/$PKGNAM-$VERSION + +# Add a package description and the post-install script: +mkdir -p $PKG/install +cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/slack-required > $PKG/install/slack-required + +# Build the package: +cd $PKG +/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz + diff --git a/pipewire-jack/build/slack-desc b/pipewire-jack/build/slack-desc new file mode 100644 index 00000000..0f2b2587 --- /dev/null +++ b/pipewire-jack/build/slack-desc @@ -0,0 +1,20 @@ +# 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------------------------------------------------------| +pipewire-jack: pipewire-jack (multimedia processing, JACK support) +pipewire-jack: +pipewire-jack: PipeWire is a project that aims to greatly improve handling of +pipewire-jack: audio and video under Linux. +pipewire-jack: This package contains the JACK sound server support for pipewire. +pipewire-jack: +pipewire-jack: +pipewire-jack: +pipewire-jack: +pipewire-jack: See also: https://pipewire.org/ +pipewire-jack: + diff --git a/pipewire-jack/build/slack-required b/pipewire-jack/build/slack-required new file mode 100644 index 00000000..3b94baf2 --- /dev/null +++ b/pipewire-jack/build/slack-required @@ -0,0 +1 @@ +pipewire |