summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/mumble/APKBUILD127
-rw-r--r--user/mumble/default-config.patch36
-rw-r--r--user/mumble/murmur.initd35
-rw-r--r--user/mumble/murmur.pre-install7
-rw-r--r--user/mumble/tests-networking.patch33
5 files changed, 238 insertions, 0 deletions
diff --git a/user/mumble/APKBUILD b/user/mumble/APKBUILD
new file mode 100644
index 000000000..5e64e6af5
--- /dev/null
+++ b/user/mumble/APKBUILD
@@ -0,0 +1,127 @@
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=mumble
+pkgver=1.3.3
+pkgrel=0
+pkgdesc="Low-latency, high-quality voice chat (client)"
+url="https://www.mumble.info/"
+arch="all"
+license="BSD-3-Clause AND BSD-2-Clause AND MIT AND GPL-2.0+"
+depends="qt5-qtbase-sqlite"
+makedepends="alsa-lib-dev avahi-dev boost-dev cmd:which libcap-dev
+ libsndfile-dev libxi-dev opus-dev protobuf-dev pulseaudio-dev
+ qt5-qtbase-dev qt5-qtsvg-dev qt5-qttools-dev speech-dispatcher-dev
+ speex-dev speexdsp-dev"
+subpackages="$pkgname-doc $pkgname-lang murmur murmur-openrc:openrc:noarch"
+install="murmur.pre-install"
+pkgusers="murmur"
+pkggroups="murmur"
+source="https://github.com/mumble-voip/mumble/releases/download/$pkgver/mumble-$pkgver.tar.gz
+ murmur.initd
+ default-config.patch
+ tests-networking.patch
+ "
+
+_qmake() {
+ qmake -recursive "$@" \
+ CONFIG+="\
+ bundled-celt \
+ no-bundled-opus \
+ no-bundled-speex \
+ no-embed-qt-translations \
+ no-g15 \
+ no-ice \
+ no-pch \
+ no-rnnoise \
+ no-update \
+ " \
+ DEFINES+="PLUGIN_PATH=/usr/lib/mumble"
+}
+
+build() {
+ _qmake main.pro
+ make release
+}
+
+check() {
+ cd src/tests
+ _qmake tests.pro
+ make check
+}
+
+package() {
+ _ver=${pkgver%_rc*}
+ _maj="${_ver%%.*}"
+ _min="${_ver#*.}"
+ _min="${_min%%.*}"
+
+ # Binaries
+ install -Dm755 release/mumble \
+ "$pkgdir"/usr/bin/mumble
+ install -Dm755 release/murmurd \
+ "$pkgdir"/usr/bin/murmurd
+
+ # Libraries & plugins
+ install -Dm755 release/libmumble.so.$_ver \
+ "$pkgdir"/usr/lib/mumble/libmumble.so.$_ver
+ for lib in libmumble.so libmumble.so.$_maj libmumble.so.$_maj.$_min; do
+ ln -s libmumble.so.$_ver \
+ "$pkgdir"/usr/lib/mumble/$lib
+ done
+ install -Dm755 release/plugins/liblink.so \
+ "$pkgdir"/usr/lib/mumble/liblink.so
+ install -Dm755 release/libcelt* \
+ "$pkgdir"/usr/lib/mumble/
+
+ # Desktop files
+ install -Dm644 scripts/mumble.desktop \
+ "$pkgdir"/usr/share/applications/mumble.desktop
+ install -Dm644 icons/mumble.svg \
+ "$pkgdir"/usr/share/icons/hicolor/scalable/apps/mumble.svg
+
+ # Man pages
+ install -Dm644 -t "$pkgdir"/usr/share/man/man1 \
+ man/mumble.1 \
+ man/murmurd.1
+
+ # Translations
+ install -Dm644 -t "$pkgdir"/usr/share/mumble/translations \
+ src/mumble/*.qm
+
+ # OpenRC
+ install -Dm755 "$srcdir"/murmur.initd \
+ "$pkgdir"/etc/init.d/murmur
+}
+
+lang() {
+ pkgdesc="Languages for package mumble"
+ install_if="$pkgname=$pkgver-r$pkgrel lang"
+
+ cd "$builddir"
+ mkdir -p "$subpkgdir"/usr/share/mumble
+ mv "$pkgdir"/usr/share/mumble/translations \
+ "$subpkgdir"/usr/share/mumble
+}
+
+murmur() {
+ pkgdesc="Low latency, high-quality voice chat (server)"
+
+ cd "$builddir"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/murmurd \
+ "$subpkgdir"/usr/bin
+ install -o murmur -g murmur -dm750 \
+ "$subpkgdir"/var/lib/murmur
+ install -g murmur -Dm640 scripts/murmur.ini \
+ "$subpkgdir"/etc/murmur.ini
+}
+
+openrc() {
+ default_openrc
+ install_if="openrc murmur=$pkgver-r$pkgrel"
+ pkgdesc="Low latency, high-quality voice chat (server OpenRC init scripts)"
+}
+
+sha512sums="be4c6d4de82a1059bf30d4c7e3c44e41e4bb50dc4a811b7d0def808c52059ff7bcccf65140db940f18cc1bb66d58ea4dab23ba5dcfae3b8b904866751f32edb3 mumble-1.3.3.tar.gz
+59283687466c9ab460017c2191c731e63203baaa6a4a3d30b42075eb8597bafeb2d3494367ab64c785ee37c7b916ea101daf22b68bdfa27844b97e18cb1d71c0 murmur.initd
+68c4c81a55663305d1525eb5d43e0b456e54f007ee327d45bf63572c59282edd88650ede7931644a9762a40c2f7e730b338b4900ae5b4da11b944b3af01c5387 default-config.patch
+e89c20b39fdb24982153b046ffe41688d6a854eee593205535155d55e49b7e534f6cec14325108a7ebd2550a6043479b01139d7bf900840bcf63188625bca304 tests-networking.patch"
diff --git a/user/mumble/default-config.patch b/user/mumble/default-config.patch
new file mode 100644
index 000000000..0c93c2225
--- /dev/null
+++ b/user/mumble/default-config.patch
@@ -0,0 +1,36 @@
+--- mumble-1.3.2/scripts/murmur.ini 2020-07-09 13:06:18.000000000 -0400
++++ mumble-1.3.2/scripts/murmur.ini 2020-09-13 00:05:08.070133921 -0400
+@@ -13,7 +13,7 @@
+
+ ; Path to database. If blank, will search for
+ ; murmur.sqlite in default locations or create it if not found.
+-database=
++database=/var/lib/murmur/murmur.sqlite
+
+ ; Murmur defaults to using SQLite with its default rollback journal.
+ ; In some situations, using SQLite's write-ahead log (WAL) can be
+@@ -93,13 +93,13 @@ icesecretwrite=
+ ; logs to the file 'murmur.log'. If you leave this field blank
+ ; on Unix-like systems, Murmur will force itself into foreground
+ ; mode which logs to the console.
+-;logfile=murmur.log
++logfile=/var/log/murmur.log
+
+ ; If set, Murmur will write its process ID to this file
+ ; when running in daemon mode (when the -fg flag is not
+ ; specified on the command line). Only available on
+ ; Unix-like systems.
+-;pidfile=
++pidfile=/var/run/murmur.pid
+
+ ; The below will be used as defaults for new configured servers.
+ ; If you're just running one server (the default), it's easier to
+@@ -291,7 +291,7 @@ allowping=true
+
+ ; If Murmur is started as root, which user should it switch to?
+ ; This option is ignored if Murmur isn't started with root privileges.
+-;uname=
++uname=murmur
+
+ ; By default, in log files and in the user status window for privileged users,
+ ; Mumble will show IP addresses - in some situations you may find this unwanted
diff --git a/user/mumble/murmur.initd b/user/mumble/murmur.initd
new file mode 100644
index 000000000..dfbc46821
--- /dev/null
+++ b/user/mumble/murmur.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+description="Mumble VoIP server"
+command="/usr/bin/murmurd"
+: "${config:=/etc/murmur.ini}"
+: "${command_args:=-ini $config}"
+
+extra_started_commands="reload"
+description_reload="Reload TLS settings"
+
+# As of 1.3.2 murmur will make the PID file *after* it switches to the
+# unprivileged user, which is bad. So make start-stop-daemon handle the
+# PID file and user switching instead.
+command_background=true
+command_args="$command_args -fg"
+
+command_user="$(awk -F= '$1 == "uname" { print $2 }' "$config")"
+: "${command_user:=murmur}"
+
+pidfile="$(awk -F= '$1 == "pidfile" { print $2 }' "$config")"
+: "${pidfile:=/var/run/$RC_SVCNAME.pid}"
+
+# Ignores logfile when -fg is used.
+logfile="$(awk -F= '$1 == "logfile" { print $2 }' "$config")"
+: "${logfile:=/var/log/murmur.log}"
+start_stop_daemon_args="--stdout $logfile --stderr $logfile"
+
+start_pre() {
+ checkpath -m 0640 -f -o "$command_user" "$logfile"
+}
+
+reload() {
+ ebegin "Reloading $RC_SVCNAME TLS settings"
+ start-stop-daemon --signal USR1 --pidfile "$pidfile"
+ eend $?
+}
diff --git a/user/mumble/murmur.pre-install b/user/mumble/murmur.pre-install
new file mode 100644
index 000000000..7baafe4d9
--- /dev/null
+++ b/user/mumble/murmur.pre-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+groupadd -r murmur 2>/dev/null
+useradd -c "Mumble daemon" -s /sbin/nologin -g murmur \
+ -m -d /var/lib/murmur -r murmur 2>/dev/null
+
+exit 0
diff --git a/user/mumble/tests-networking.patch b/user/mumble/tests-networking.patch
new file mode 100644
index 000000000..a1decd477
--- /dev/null
+++ b/user/mumble/tests-networking.patch
@@ -0,0 +1,33 @@
+--- mumble-1.3.2/src/tests/TestServerResolver/TestServerResolver.cpp 2020-07-09 17:06:18.000000000 +0000
++++ mumble-1.3.2/src/tests/TestServerResolver/TestServerResolver.cpp 2020-09-20 06:15:32.741670504 +0000
+@@ -33,9 +33,7 @@ class TestServerResolver : public QObjec
+ };
+
+ void TestServerResolver::simpleSrv() {
+-#ifdef USE_NO_SRV
+- return;
+-#endif
++ return; // network access required
+
+ // Qt 5's SRV resolver does not work in Wine.
+ // For more info, see https://bugs.winehq.org/show_bug.cgi?id=44296
+@@ -86,9 +84,7 @@ void TestServerResolver::simpleSrv() {
+ }
+
+ void TestServerResolver::srvCustomPort() {
+-#ifdef USE_NO_SRV
+- return;
+-#endif
++ return; // network access required
+
+ // Qt 5's SRV resolver does not work in Wine.
+ // For more info, see https://bugs.winehq.org/show_bug.cgi?id=44296
+@@ -139,6 +135,8 @@ void TestServerResolver::srvCustomPort()
+
+
+ void TestServerResolver::simpleCNAME() {
++ return; // network access required
++
+ ServerResolver r;
+ QSignalSpy spy(&r, SIGNAL(resolved()));
+