PKGBUILDs/community/mumble/PKGBUILD
2022-09-15 00:42:08 +00:00

130 lines
5.7 KiB
Bash

# Maintainer: David Runge <dvzrv@archlinux.org>
# Maintainer: Sven-Hendrik Haase <svenstaro@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.287
pkgrel=1
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-configuration.patch"
)
sha512sums=('34ed30c18257ba8deae6938009a90147c8bc3a0aca28e69bea7ec0262e8d2cdacb9a840fac7d3dd623a52ef8d5903ed5424b62b483af21d6df6aa9632eae9d82'
'SKIP'
'97c7effdddec324e40195c36ef4927950a5de26d2ee2d268d89df6fb547207bbbe30292773316cae6f57ec9923244f205fb0edc377b798771ba7385e3c11d86a'
'a4d82a28e0e4277ca2f198285d164ae55e052a5f6b582ac1b4aa98409fea425c93e8f86f61878bd0b176ed33d307d16b877f34941f32e2147a38778a8554e25d'
'5af28d0c2b2b072cfbd500b5f63549e88a86cf3fc15e4d2df89e787c4d2bafdecbe078a518e0d1b25d82f9873cb06838ec1c9ebed625ffb7e8c80fcd942ebf74'
'411784e8e0dcf6c163780ae895ae1a6bdad0bb2dd2b128911c484ac3eff073d95c5791b625493a2b8296d24bd7e6ac72d3c42180817e48b29f0c6a8fd841807c'
'e35dee4ce1cca15747330ba21892064adec85feb9937a89aea95ccf2c668746075fbe1c343e26ba2ac26a9e36144fb0b3eb0f44d85e6d258040bcd3500818a31')
b2sums=('5fc89c184aa54ab8269870fd87b6c9ce271d77c05a6ecb2aa78eccf297ffb842a50a18a142ac628c1b287a2b5e6c0ae0dced3237242303840a4de05b7f3e7040'
'SKIP'
'a416d071d9658fc3f3ea267d6ff24237317f5c05b59fe1578e5a4cb4911840896bf5e524a143f5c70a797da9f343312468720f03343b4b66bea20e94aa316cc2'
'4d8f84bccb7064e401f9d0ca2723b4a072a30e0eda0b458e22324f2c672c2684253776c441abdcccf29ab7d27887ffe8dc6394c08eb43ae9cf4498d5b00ca888'
'9909371a0d1c06d2aa00f161aebb19266aad0253b407dd01da5325f4f307678bba28a89596bd2ec97df5844068856c10bb4b10acad7bf170dd2853b3e11c48cd'
'999b2848c718f25a2d8257595194521e08d36d101906d76b137218f0a19f2451b7e1adc0c013e1f1c3448145b89a1e88f46cb1c9da27777737379227d3574d10'
'd77b81c5ac39561e3df087ad325e88909b083dad95a25c7106a941645354c87d07ea5d41eec5aa4a77a402cadbe8230a4a1c641d8414d11174e4b3254fc18647')
# 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"
# set default values in configuration file
patch -Np1 -i ../"${pkgname}-1.4.230-configuration.patch"
}
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}
mv -v "${pkgdir}/usr/share/man/man1/"{mumble-server,murmurd}.1
mv -v "${pkgdir}/usr/share/man/man1/"{mumble-server,murmur}-user-wrapper.1
(
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 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: