added community/mumble

This commit is contained in:
Kevin Mihelich 2022-07-23 20:01:14 +00:00
parent 0aaeb606c3
commit 647db3c599
9 changed files with 302 additions and 0 deletions

143
community/mumble/PKGBUILD Normal file
View file

@ -0,0 +1,143 @@
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Lauri Niskanen <ape@ape3000.com>
# Contributor: Sebastian.Salich@gmx.de
# Contributor: Doc Angelo
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed makedepend on lib32-gcc-libs
pkgbase=mumble
pkgname=('mumble' 'murmur')
pkgver=1.4.230
pkgrel=13
pkgdesc="An Open Source, low-latency, high quality voice chat software"
arch=('x86_64')
url="https://www.mumble.info/"
license=('BSD')
# shared depends
depends=('gcc-libs' 'glibc' 'openssl' 'qt5-base')
# shared makedepends
makedepends=('avahi' 'boost' 'cmake' 'poco' 'protobuf' 'python' 'qt5-tools' 'speech-dispatcher')
# mumble makedepends
makedepends+=('alsa-lib' 'hicolor-icon-theme' 'jack' 'libpulse' 'libsndfile'
'libspeechd' 'libx11' 'libxi' 'mesa' 'opus' 'qt5-svg' 'speex' 'xdg-utils')
# murmur makedepends
makedepends+=('grpc' 'libcap' 'zeroc-ice')
source=(
"https://github.com/mumble-voip/mumble/releases/download/v${pkgver}/mumble-${pkgver}.tar.gz"{,.sig}
"murmur.dbus.conf"
"murmur.service"
"murmur.sysusers"
"murmur.tmpfiles"
"${pkgname}-1.4.230-missing-include.patch"
"${pkgname}-1.4.230-find-poco.patch"
"${pkgname}-1.4.230-configuration.patch"
"${pkgname}-PR5648.patch"::https://github.com/mumble-voip/mumble/pull/5648.patch
)
sha512sums=('6cffc7a95d88b33876f4093b99266468210f5c14f190fbd2fbe4991bef91a567e55296e7c8c6cc99e19c054853211085cc3cc08109e367e6776afb70766b3a53'
'SKIP'
'97c7effdddec324e40195c36ef4927950a5de26d2ee2d268d89df6fb547207bbbe30292773316cae6f57ec9923244f205fb0edc377b798771ba7385e3c11d86a'
'a4d82a28e0e4277ca2f198285d164ae55e052a5f6b582ac1b4aa98409fea425c93e8f86f61878bd0b176ed33d307d16b877f34941f32e2147a38778a8554e25d'
'5af28d0c2b2b072cfbd500b5f63549e88a86cf3fc15e4d2df89e787c4d2bafdecbe078a518e0d1b25d82f9873cb06838ec1c9ebed625ffb7e8c80fcd942ebf74'
'411784e8e0dcf6c163780ae895ae1a6bdad0bb2dd2b128911c484ac3eff073d95c5791b625493a2b8296d24bd7e6ac72d3c42180817e48b29f0c6a8fd841807c'
'07448a7c1c3557c360a9448764ecffadb331576a1e1c4da33a663a5c78f63bb2f7d18a52d7aeeb83c1868507f48bcc7da74bff3050e43a94ff1cb17db9aa9cbe'
'6ab68c8d89b1eb6e79a31216e4348c972847ce8687e45c59c29ed2343da56a586ea20dffd9066146faa56749cd94deb99fa22b3eb05df2ba705d04d46cb0bbdb'
'e35dee4ce1cca15747330ba21892064adec85feb9937a89aea95ccf2c668746075fbe1c343e26ba2ac26a9e36144fb0b3eb0f44d85e6d258040bcd3500818a31'
'b533085452af6397ae9cd6a5b539143335260adcbd9412f42d3e0a5eb28729c9628f5a2945f5d0ed8aecc36e8ce406ac5c11e29a7e455b24e956cacc969c8f05')
b2sums=('da433f3c15d7e45dfac0c8a78c9dbe86ba8d5cd078d2d87fd4d90718968fc9e5928c3c5c5ba2e40a8a54d02a646c5fc6a7ee2fff4b71dfa411d74f395b097c26'
'SKIP'
'a416d071d9658fc3f3ea267d6ff24237317f5c05b59fe1578e5a4cb4911840896bf5e524a143f5c70a797da9f343312468720f03343b4b66bea20e94aa316cc2'
'4d8f84bccb7064e401f9d0ca2723b4a072a30e0eda0b458e22324f2c672c2684253776c441abdcccf29ab7d27887ffe8dc6394c08eb43ae9cf4498d5b00ca888'
'9909371a0d1c06d2aa00f161aebb19266aad0253b407dd01da5325f4f307678bba28a89596bd2ec97df5844068856c10bb4b10acad7bf170dd2853b3e11c48cd'
'999b2848c718f25a2d8257595194521e08d36d101906d76b137218f0a19f2451b7e1adc0c013e1f1c3448145b89a1e88f46cb1c9da27777737379227d3574d10'
'0df6753085dfdc9ed9739aa9a0565b7166b07798cdf57aee12cd1c240e98c46adba8c4182af22869cdd59d0c9063ac9a368b3760f418ea3721f5380fc5df89a8'
'2c9322e21b3d2b468fee36213ac8f87767008f699350b9a2cd93158783dd0cf6d3ddf5e81f1685fc2b5cc07569e4e2f0be01e07a080564aaedfbc7aaea73596f'
'd77b81c5ac39561e3df087ad325e88909b083dad95a25c7106a941645354c87d07ea5d41eec5aa4a77a402cadbe8230a4a1c641d8414d11174e4b3254fc18647'
'97249a2f9aa4754d72a7ac14d6d888efa5a7bbd0f6a5d5467f0e5f5c9af5b96cc3e4e636b4b3f8c28fb226dbf183af4750deb1a267e89698efc96a94c565816b')
# See https://github.com/mumble-voip/mumble-gpg-signatures
validpgpkeys=(
'1EDEBE2A93CB97FA9903D52E25F63C66245DFC60' # Mumble Automatic Build Infrastructure 2022 <mumble-auto-build-2022@mumble.info>
)
prepare() {
cd "${pkgbase}-${pkgver}.src"
patch -Np1 -i ../"${pkgname}-1.4.230-missing-include.patch"
patch -Np1 -i ../"${pkgname}-1.4.230-find-poco.patch"
patch -Np1 -i ../"${pkgname}-1.4.230-configuration.patch"
patch -Np1 -i ../"${pkgname}-PR5648.patch"
# fix Unknown CMake command "CHECK_INCLUDE_FILE"
sed '1 i include(CheckIncludeFile)' -i overlay_gl/CMakeLists.txt
}
build() {
# upstream requires adding arbitrary build number specifically, as otherwise the version string is wrong:
# https://github.com/mumble-voip/mumble/issues/5538
local _build_number="$(cut -d '.' -f 3 <<< "$pkgver")"
local _default_options=(
-D CMAKE_INSTALL_PREFIX=/usr
-D CMAKE_BUILD_TYPE=None
-D BUILD_NUMBER="$_build_number"
-D warnings-as-errors=OFF
-W no-dev
-S "${pkgbase}-${pkgver}.src"
)
cmake "${_default_options[@]}" \
-Dbundled-opus=OFF \
-Dbundled-speex=OFF \
-Dupdate=OFF \
-Dserver=OFF \
-B build-client
make VERBOSE=1 -C build-client
cmake "${_default_options[@]}" \
-Dgrpc=ON \
-Dclient=OFF \
-B build-server
make VERBOSE=1 -C build-server
}
package_mumble() {
pkgdesc+=" (client)"
# NOTE: avahi, jack, libpulse, opus is dlopen'ed
depends+=('avahi' 'hicolor-icon-theme' 'jack' 'libasound.so' 'libprotobuf.so'
'libpulse' 'libsndfile.so' 'libspeechd' 'libx11' 'libxi' 'opus' 'poco'
'qt5-svg' 'speex' 'xdg-utils')
optdepends=(
'lib32-glibc: for mumble-overlay'
'espeak-ng: Text-to-speech support'
'speech-dispatcher: Text-to-speech support'
)
make DESTDIR="${pkgdir}" install -C build-client
install -vDm 644 "${pkgbase}-${pkgver}.src/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}
package_murmur() {
pkgdesc+=" (server)"
# NOTE: avahi is dlopen'ed
depends+=('avahi' 'libcap.so' 'libdns_sd.so' 'libgrpc++.so' 'libprotobuf.so' 'zeroc-ice')
backup=('etc/murmur.ini')
install=murmur.install
make DESTDIR="${pkgdir}" install -C build-server
# renaming of the server component was not done in full capacity: https://github.com/mumble-voip/mumble/issues/5436
mv -v "${pkgdir}/usr/bin/"{mumble-server,murmurd}
(
cd "${pkgbase}-${pkgver}.src"
install -vDm 640 scripts/murmur.ini -t "${pkgdir}/etc"
install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
install -vDm 644 man/murmur*.1 -t "${pkgdir}/usr/share/man/man1/"
install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -vDm 644 src/murmur/{Murmur.ice,MurmurRPC.proto} -t "${pkgdir}/usr/share/${pkgname}"
)
install -vDm 644 murmur.dbus.conf "${pkgdir}/usr/share/dbus-1/system.d/murmur.conf"
install -vDm 644 murmur.service -t "${pkgdir}/usr/lib/systemd/system/"
install -vDm 644 murmur.sysusers "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
install -vDm 644 murmur.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
}
# vim: sw=2:ts=2 et:

View file

@ -0,0 +1,21 @@
diff -ruN a/scripts/murmur.ini b/scripts/murmur.ini
--- a/scripts/murmur.ini 2022-01-18 02:00:00.334013700 +0100
+++ b/scripts/murmur.ini 2022-01-20 22:32:41.267250949 +0100
@@ -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/db/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
@@ -99,7 +99,7 @@
; 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=
; If set, Murmur will write its process ID to this file
; when running in daemon mode (when the -fg flag is not

View file

@ -0,0 +1,38 @@
commit 5e0962474cbed1dbfea34afd8eeb6cd71dc518d3
Author: Carl George <carl@george.computer>
Date: Tue Apr 5 18:49:13 2022 -0500
BUILD(cmake): Find and link Poco::XML
Without this, building against the latest poco snapshot results in
errors like:
/usr/bin/ld: /builddir/build/BUILD/mumble-1.4.230.src/src/mumble/PluginManifest.cpp:72: undefined reference to `typeinfo for Poco::XML::Element'
(cherry picked from commit fefdd79ebcd53a3035967789d004938ee39e2030)
# Conflicts:
# src/mumble/CMakeLists.txt
diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt
index 4530dc753..be37fd674 100644
--- a/src/mumble/CMakeLists.txt
+++ b/src/mumble/CMakeLists.txt
@@ -384,11 +384,16 @@ target_include_directories(mumble
"${PLUGINS_DIR}"
)
-find_pkg(Poco COMPONENTS Zip)
+find_pkg(Poco
+ COMPONENTS
+ XML
+ Zip
+)
if(TARGET Poco::Zip)
target_link_libraries(mumble
PRIVATE
+ Poco::XML
Poco::Zip
)
else()

View file

@ -0,0 +1,33 @@
commit a2a2aabdf535cb7f09dfa1c2d4e10566246b06a9
Author: Sergei Trofimovich <slyich@gmail.com>
Date: Sun Feb 27 10:59:57 2022 +0000
BUILD(positional-audio): Fix missing <memory> include
Without the change the build fails on upcoming gcc-12 as:
/build/mumble/plugins/gtav/gtav.cpp:13:13:
error: 'unique_ptr' in namespace 'std' does not name a template type
13 | static std::unique_ptr< Game > game;
| ^~~~~~~~~~
/build/mumble/plugins/gtav/gtav.cpp:12:1:
note: 'std::unique_ptr' is defined in header '<memory>';
did you forget to '#include <memory>'?
11 | #include <cstring>
+++ |+#include <memory>
12 |
(cherry picked from commit 36398fb3b293fc889bbc38df29665359f5c2a0ca)
diff --git a/plugins/gtav/gtav.cpp b/plugins/gtav/gtav.cpp
index 468ff8922..829b1f544 100644
--- a/plugins/gtav/gtav.cpp
+++ b/plugins/gtav/gtav.cpp
@@ -9,6 +9,7 @@
#include "mumble_positional_audio_utils.h"
#include <cstring>
+#include <memory>
static std::unique_ptr< Game > game;

View file

@ -0,0 +1,22 @@
<!-- vi: set ft=xml: -->
<!--
As described in http://mumble.sourceforge.net/DBus,
but with different username
-->
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy user="murmur">
<allow own="net.sourceforge.mumble.murmur"/>
</policy>
<policy user="root">
<allow own="net.sourceforge.mumble.murmur"/>
</policy>
<policy context="default">
<allow send_destination="net.sourceforge.mumble.murmur"/>
<allow receive_sender="net.sourceforge.mumble.murmur"/>
</policy>
</busconfig>

View file

@ -0,0 +1,6 @@
post_install() {
echo "You might have to reload dbus before launching murmur:"
echo " systemctl reload dbus"
echo "Don't forget to set the superuser password:"
echo " murmurd -ini /etc/murmur.ini -supw <your-password>"
}

View file

@ -0,0 +1,36 @@
[Unit]
Description=Mumble Daemon
Documentation=man:murmurd(1)
After=network.target
Wants=network-online.target
[Service]
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
ExecStart=/usr/bin/murmurd -ini /etc/murmur.ini -fg
Group=murmur
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=true
PrivateTmp=true
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=true
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=full
RestrictAddressFamilies=~AF_PACKET AF_NETLINK
RestrictNamespaces=yes
RestrictSUIDSGID=yes
RestrictRealtime=yes
Restart=always
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=simple
User=murmur
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1 @@
u murmur 122 "Murmur User" /var/db/murmur

View file

@ -0,0 +1,2 @@
z /etc/murmur.ini 0640 root murmur
d /var/db/murmur 0750 murmur murmur -