upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / mumble / trunk / PKGBUILD
blobb607605869bd99a227df71eb640dc1ac2fb71a51
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
3 # Contributor: Lauri Niskanen <ape@ape3000.com>
4 # Contributor: Sebastian.Salich@gmx.de
5 # Contributor: Doc Angelo
7 # NOTE: needs to be built using multilib for mumble-overlay!
8 pkgbase=mumble
9 pkgname=(mumble mumble-server)
10 pkgver=1.5.517
11 pkgrel=1
12 pkgdesc="An Open Source, low-latency, high quality voice chat software"
13 arch=(x86_64)
14 url="https://www.mumble.info/"
15 license=(BSD)
16 # shared depends
17 depends=(
18   gcc-libs
19   glibc
20   qt5-base
22 # shared makedepends
23 makedepends=(
24   avahi
25   boost
26   cmake
27   openssl
28   protobuf
29   python
30   qt5-tools
32 # mumble makedepends
33 makedepends+=(
34   alsa-lib
35   hicolor-icon-theme
36   jack
37   lib32-gcc-libs
38   libpulse
39   libsndfile
40   libspeechd
41   libx11
42   libxi
43   mesa
44   nlohmann-json
45   opus
46   poco
47   qt5-svg
48   rnnoise
49   speech-dispatcher
50   speexdsp
51   xdg-utils
53 # mumble-server makedepends
54 makedepends+=(
55   libcap
56   systemd
57   zeroc-ice
59 checkdepends=(
60   xorg-server-xvfb
62 source=(
63   https://github.com/mumble-voip/mumble/releases/download/v$pkgver/$pkgbase-$pkgver.tar.gz{,.sig}
64   mumble-server.tmpfiles
65   $pkgbase-1.5.517-config_defaults.patch
66   $pkgbase-1.5.517-pkgconf.patch
68 sha512sums=('f64147aa392519d1a7ef538d4fa23eaba0e21474bc9155e2c9e82cff859ff93c455a9ac18aed6197513486ebfca36560bd6de51327555dc7efab884a6a601d9f'
69             'SKIP'
70             '350575aaf26ac8b7dc567018defd59913da957983986017e82a92e53f2a6d21473d9c2566177abd7611d95858a723bcf7f8dad49e8ca18d18b9fa4e75fb15ca6'
71             'c12f6269c5745532031f09fba5b9e3118e6beaf387ae0aaba6ff8380a1452b47f9f0d1cae04472a5763b3da695e03467de152a98bf03c01ae59bd6d553ec7100'
72             '32a4ac43ba7fb2c9bee61609a6edf17d7dc26b27e13ab425ee12aaf25cf1071d99a35c3b045ea23dec1281725790c5ef0de3c9fb5e594073281877ecca70396d')
73 b2sums=('d61c8118423af6514ed98a899916516920fae790ce39bdbbc76c4b14a298cf6989e73e2a0f977634968e758ff1f77a03727671617e9c867728f57995ff0cfec2'
74         'SKIP'
75         '476353608e794c431d9c79a54e11ad0442e3c96607b6492d3b2f5b589b96b120611e2e3dc1bb4f8e17c0911c238a9ca7b409277353fa08b9f690217f80d7dc4e'
76         'c607246691e9701f54b8d133db7d424a46ab94781178d172ae8a35df8ca505da59734ddae00789b93af316de3344d7e177a1a988e1438121e1e921ff59724f24'
77         'b3ea596e6603e0e0dbefdd90dea1dddd5609962e26594083c69bc28f69d306405f2ad7532d3d5360af0010ee9f06c7432089d1eca77a7ffa3df2bc7e76608106')
78 # See https://github.com/mumble-voip/mumble-gpg-signatures
79 validpgpkeys=(
80   '1EDEBE2A93CB97FA9903D52E25F63C66245DFC60'  # Mumble Automatic Build Infrastructure 2022 <mumble-auto-build-2022@mumble.info>
81   'DA223B9603A9C7DD4691143E69F82AFF148DC0FF'  # Mumble Automatic Build Infrastructure 2023 <mumble-auto-build-2023@mumble.info>
84 prepare() {
85   # add default configuration options
86   patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-1.5.517-config_defaults.patch
87   # fix the use of pkgconf in cmake: https://github.com/mumble-voip/mumble/issues/6038
88   patch -Np1 -d $pkgbase-$pkgver -i ../$pkgbase-1.5.517-pkgconf.patch
91 build() {
92   local default_options=(
93     -D CMAKE_INSTALL_PREFIX=/usr
94     -D CMAKE_BUILD_TYPE=None
95     # upstream requires adding arbitrary build number specifically, as otherwise the version string is wrong:
96     # https://github.com/mumble-voip/mumble/issues/5538
97     -D BUILD_NUMBER="${pkgver/*./}"
98     -D tests=ON
99     -D warnings-as-errors=OFF
100     -S $pkgbase-$pkgver
101     -W no-dev
102   )
103   local cmake_options_client=(
104     -D update=OFF
105     -D server=OFF
106     -B build-client
107     -D bundled-json=OFF
108     -D bundled-rnnoise=OFF
109     -D bundled-speex=OFF
110   )
111   local cmake_options_server=(
112     -D MUMBLE_INSTALL_ABS_SYSCONFDIR=/etc/mumble-server
113     -D CMAKE_INSTALL_SYSCONFDIR=/etc
114     -D client=OFF
115     -B build-server
116   )
118   cmake "${default_options[@]}" "${cmake_options_server[@]}"
119   cmake --build build-server --verbose
121   cmake "${default_options[@]}" "${cmake_options_client[@]}"
122   cmake --build build-client --verbose
125 check() {
126   xvfb-run ctest --test-dir build-client --output-on-failure
127   ctest --test-dir build-server --output-on-failure
130 package_mumble() {
131   pkgdesc+=" (client)"
132   # NOTE: jack, libpulse, and pipewire are dlopen'ed
133   depends+=(
134     alsa-lib libasound.so
135     avahi libdns_sd.so
136     hicolor-icon-theme
137     jack
138     protobuf libprotobuf.so
139     libpulse
140     libsndfile libsndfile.so
141     libspeechd
142     libx11
143     libxi
144     openssl libcrypto.so libssl.so
145     opus libopus.so
146     poco
147     qt5-svg
148     rnnoise
149     speexdsp libspeexdsp.so
150     xdg-utils
151   )
152   optdepends=(
153     'lib32-glibc: for mumble-overlay'
154     'espeak-ng: Text-to-speech support'
155     'speech-dispatcher: Text-to-speech support'
156   )
158   DESTDIR="$pkgdir" cmake --install build-client
159   install -vDm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
162 package_mumble-server() {
163   pkgdesc+=" (server)"
164   depends+=(
165     avahi libdns_sd.so
166     libcap libcap.so
167     openssl libcrypto.so libssl.so
168     protobuf libprotobuf.so
169     zeroc-ice
170   )
171   conflicts=('murmur<1.5')
172   replaces=('murmur<1.5')
173   backup=(etc/$pkgbase/$pkgname.ini)
174   install=mumble-server.install
176   DESTDIR="$pkgdir" cmake --install build-server
177   install -vDm 644 $pkgbase-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
178   # fix file mode: https://github.com/mumble-voip/mumble/issues/6039
179   chmod 640 "$pkgdir/etc/$pkgbase/$pkgname.ini"
180   install -vDm 644 $pkgname.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
182 # vim: sw=2:ts=2 et: