aboutsummaryrefslogtreecommitdiff
path: root/audio/jamulus
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-10-12 23:14:14 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-10-13 08:02:58 +0700
commit95b63fda6a61945d69b27a34f6433399c9784869 (patch)
treefc220b13146e9c515bcd7030b228818260ed2218 /audio/jamulus
parent5010d7c8459dc8faa060d594f4d63617b00191ee (diff)
audio/jamulus: Added (real-time jam session client/server).
Signed-off-by: David Spencer <baildon.research@googlemail.com>
Diffstat (limited to 'audio/jamulus')
-rw-r--r--audio/jamulus/README15
-rw-r--r--audio/jamulus/SERVER.txt36
-rw-r--r--audio/jamulus/doinst.sh3
-rw-r--r--audio/jamulus/jamulus.SlackBuild135
-rw-r--r--audio/jamulus/jamulus.info10
-rw-r--r--audio/jamulus/jamulus.pngbin0 -> 68628 bytes
-rw-r--r--audio/jamulus/setcap.sh1
-rw-r--r--audio/jamulus/slack-desc19
8 files changed, 219 insertions, 0 deletions
diff --git a/audio/jamulus/README b/audio/jamulus/README
new file mode 100644
index 000000000000..7076933b9d8b
--- /dev/null
+++ b/audio/jamulus/README
@@ -0,0 +1,15 @@
+jamulus (real-time jam session client/server)
+
+The Jamulus software enables musicians to perform real-time jam sessions
+over the internet. There is one server running the Jamulus server software
+which collects the audio data from each Jamulus client, mixes the audio
+data and sends the mix back to each client.
+
+The jamulus binary can be run as a client (default) or a server. See
+"jamulus --help" and SERVER.txt for details.
+
+This package uses POSIX filesystem capabilities to execute with
+elevated privileges (required for realtime audio processing). This
+may be considered a security/stability risk. Please read
+http://www.slackbuilds.org/caps/ for more information. To disable
+capabilities, pass SETCAP=no to the script.
diff --git a/audio/jamulus/SERVER.txt b/audio/jamulus/SERVER.txt
new file mode 100644
index 000000000000..ea4892397be8
--- /dev/null
+++ b/audio/jamulus/SERVER.txt
@@ -0,0 +1,36 @@
+By default, the jamulus binary can function as:
+
+- Client with GUI (default mode, X and jackd must be running)
+- Server with GUI (-s option, only X must be running)
+- Headless server (-s and -n options, neither X nor jackd required)
+
+Even though the headless mode doesn't require a running X server,
+it still requires the qt4 and X11 shared libraries. There's no way to
+compile jamulus without these.
+
+If you launch jamulus from the desktop start menu, you'll get the client.
+If you want to run a server, you'll have to either run it from the command
+line, or create a different launcher/shortcut for jamulus as a server.
+
+If you want to run a headless server that starts at boot time (like
+a regular daemon), currently the best way to do this is to call it
+from /etc/rc.d/rc.local. There's no "daemon" option, so you'll have to
+background it with &, and redirect stdout/stderr somewhere (see also
+the -l <logfile> option).
+
+If you *really* want to build a dedicated jamulus server, you can do
+so by setting SERVERONLY=yes in the SlackBuild's environment. In this
+case, you can ignore the REQUIRES="jack-audio-connection-kit" line in
+the .info file.
+
+The resulting jamulus binary will work exactly as the regular jamulus,
+except it doesn't make sound nor accept audio input from your instrument.
+It'll only be useful as a server (with -s and possibly also -n).
+
+The *only* reason to ever do this is if you really *really* don't want
+to install jack-audio-connection-kit for some reason.
+
+For those who want to complain that I shouldn't have listed
+jack-audio-connection-kit as required: It *is* required, for the *normal*
+use case. Building without JACK support is a very specialized thing,
+not useful to the general population of users.
diff --git a/audio/jamulus/doinst.sh b/audio/jamulus/doinst.sh
new file mode 100644
index 000000000000..5fb28930db0b
--- /dev/null
+++ b/audio/jamulus/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/audio/jamulus/jamulus.SlackBuild b/audio/jamulus/jamulus.SlackBuild
new file mode 100644
index 000000000000..bdecd1731ea4
--- /dev/null
+++ b/audio/jamulus/jamulus.SlackBuild
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+# Slackware build script for jamulus
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Possible TODOs:
+# - write a man page
+# - have slack-desc show whether or not SERVERONLY=yes
+
+PRGNAM=jamulus
+VERSION=${VERSION:-3.4.3}
+BUILD=${BUILD:-1}
+
+TAG=${TAG:-_SBo}
+
+# I hate capitalized package names, so:
+SRCNAM=Jamulus
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+# Check this before doing anything else.
+if [ "${SERVERONLY:-no}" = "yes" ]; then
+ EXTRACONF="CONFIG+=nosound"
+elif ! pkg-config --exists jack; then
+ cat <<EOF
+
+***********************************************************************
+$0: jack-audio-connection-kit not found.
+
+If you want $PRGNAM to be able to make sound, you must install
+jack-audio-connection-kit before running this script.
+
+If you want to build a dedicated server, you don't have to install
+jack-audio-connection-kit. Instead, export SERVERONLY=yes in the
+environment. See SERVER.txt for details.
+***********************************************************************
+
+EOF
+ sleep 5
+ exit 1
+fi
+
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM$VERSION
+chown -R root:root .
+
+# permissions are gross, nonstandard find needed here:
+find -L . -type d -a -exec chmod 755 {} \+ -o \
+ -type f -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# jamulus can be built with either qt4 or qt5. Let's stick with
+# qt4 until Slackware starts shipping qt5... for paranoia's sake,
+# remove all references to qt5 and/or qt3 from the environment.
+unset QTDIR
+unset QT5DIR
+PATH=/bin:/sbin:/usr/bin:/usr/sbin
+source /etc/profile.d/qt4.sh
+QTDIR=$QT4DIR
+export QTDIR QT5DIR
+
+qmake "CONFIG+=noupcasename" $EXTRACONF \
+ QMAKE_CFLAGS="$SLKCFLAGS" QMAKE_CXXFLAGS="$SLKCFLAGS" \
+ $SRCNAM.pro
+make clean
+make
+
+# No 'make install' target, so:
+mkdir -p $PKG/usr/bin $PKG/usr/share/applications $PKG/usr/share/pixmaps
+install -s -m0755 $PRGNAM $PKG/usr/bin/
+install -m0644 src/res/$PRGNAM.desktop $PKG/usr/share/applications/
+
+# The png icons provided are tiny, but the OSX icon is big enough
+# to actually see, so I extracted the 256x256 version & include
+# it with the build.
+cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# NEWS is a 0-byte placeholder in 3.4.3.
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Include our own (hopefully) helpful hints for servers.
+cat $CWD/SERVER.txt > $PKG/usr/doc/$PRGNAM-$VERSION/SERVER.txt
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# Only add capability stuff if not disabled:
+if [ "${SERVERONLY:-no}" != "yes" ]; then
+ if [ "${SETCAP:-yes}" = "yes" ]; then
+ cat $CWD/setcap.sh >> $PKG/install/doinst.sh
+ # Only allow execution by audio group
+ chown root:audio $PKG/usr/bin/$PRGNAM
+ chmod 0750 $PKG/usr/bin/$PRGNAM
+ fi
+fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/audio/jamulus/jamulus.info b/audio/jamulus/jamulus.info
new file mode 100644
index 000000000000..e51dc1300ed6
--- /dev/null
+++ b/audio/jamulus/jamulus.info
@@ -0,0 +1,10 @@
+PRGNAM="jamulus"
+VERSION="3.4.3"
+HOMEPAGE="http://llcon.sourceforge.net/"
+DOWNLOAD="https://downloads.sourceforge.net/project/llcon/Jamulus/3.4.3/Jamulus-3.4.3.tar.gz"
+MD5SUM="fa0f73b1d4e2fdbeb230899f1b2d0f0e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="jack-audio-connection-kit"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/audio/jamulus/jamulus.png b/audio/jamulus/jamulus.png
new file mode 100644
index 000000000000..3619a9ea9012
--- /dev/null
+++ b/audio/jamulus/jamulus.png
Binary files differ
diff --git a/audio/jamulus/setcap.sh b/audio/jamulus/setcap.sh
new file mode 100644
index 000000000000..04679cd12a4f
--- /dev/null
+++ b/audio/jamulus/setcap.sh
@@ -0,0 +1 @@
+[ -x /sbin/setcap ] && /sbin/setcap cap_ipc_lock,cap_sys_nice=ep usr/bin/jamulus
diff --git a/audio/jamulus/slack-desc b/audio/jamulus/slack-desc
new file mode 100644
index 000000000000..c60183610b5d
--- /dev/null
+++ b/audio/jamulus/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------------------------------------------------------|
+jamulus: jamulus (real-time jam session client/server)
+jamulus:
+jamulus: The Jamulus software enables musicians to perform real-time jam
+jamulus: sessions over the internet. There is one server running the Jamulus
+jamulus: server software which collects the audio data from each Jamulus
+jamulus: client, mixes the audio data and sends the mix back to each client.
+jamulus:
+jamulus:
+jamulus:
+jamulus:
+jamulus: