aboutsummaryrefslogblamecommitdiffstats
path: root/community/mumble/APKBUILD
blob: 33f749a4f618a89f68677d5a65d77299658af084 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                              


                                                          
             
        

                                                       
          
                      
                
                   


                                                                   
                            

                  
                                                              
                                                                                                 

                              
                        
                     
                                   
 



                      
         
                      

                             
                                   
                                                                                                                   




                                                                               
                    


           



                                         
                                        
                                                 
                                                


                                                       
                                                             

                                                                   
                                                     

                                                     
                                                   
                                                       
                                                     
                                           
                                         


                                  
                                                             
                                                 
                                                               
                                           
                                                                          
 

                                              
                                                              



                                                          
                      
 
                                            
                                           
                                          
                                            
                                             
                                           
 


                                                                         
                                                                        
                                              
 
                                              
                                                             
                                       
                                                                


                                               



                                                          
 

                                        
                                                         
                                  
                                                              
                   

 
                                                                                                                                                                  

                                                                                                                                                        
                                                                                                                                                  
                                                                                                                                               
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr>
pkgname=mumble
pkgver=1.2.19
pkgrel=9
pkgdesc="Low-latency, high quality voice chat software"
url="https://wiki.mumble.info"
arch="all"
license="BSD-3-Clause"
options="!check"
depends="qt-sqlite"
depends_dev=""
makedepends="qt-dev libsndfile-dev boost-dev avahi-dev protobuf-dev
	libxi-dev speex-dev speexdsp-dev libcap-dev"
install="murmur.pre-install"
pkgusers="murmur"
pkggroups="murmur"
subpackages="$pkgname-doc murmur murmur-doc:murmur_doc:noarch"
source="https://github.com/mumble-voip/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
	CVE-2018-20743.1.patch
	CVE-2018-20743.2.patch
	boost-1.66.patch
	murmur.initd"
builddir="$srcdir"/$pkgname-$pkgver

# secfixes:
#   1.2.19-r9:
#     - CVE-2018-20743

build() {
	cd "$builddir"

	CXXFLAGS="-std=c++11"
	qmake -recursive main.pro \
		CONFIG+="no-speechd no-g15 no-update no-ice bundled-celt no-embed-qt-translations no-bundled-speex"

	# qmake-qt4 ignores complation *FLAGS thus patch the Makefiles directly
	sed -i "s;^\(CXXFLAGS.*=.*\);& $CXXFLAGS;" \
		*/Makefile* */*/Makefile*

	make release
}

package() {
	cd "$builddir"

	# Binaries.
	install -Dm755 ./release/mumble \
		"$pkgdir"/usr/bin/mumble
	install -Dm755 ./scripts/mumble-overlay \
		"$pkgdir"/usr/bin/mumble-overlay

	# Libraries.
	install -Dm755 ./release/libmumble.so.$pkgver \
		"$pkgdir"/usr/lib/mumble/libmumble.so.$pkgver
	for lib in libmumble.so libmumble.so.1 libmumble.so.1.2; do
		ln -s libmumble.so.$pkgver \
			"$pkgdir"/usr/lib/mumble/$lib
	done
	install -Dm755 ./release/plugins/liblink.so \
		"$pkgdir"/usr/lib/mumble/liblink.so
	install -Dm755 ./release/plugins/libmanual.so \
		"$pkgdir"/usr/lib/mumble/libmanual.so
	install -Dm755 ./release/libcelt* \
		"$pkgdir"/usr/lib/mumble/

	# Misc.
	install -Dm644 ./LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	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.
	mkdir -p "$pkgdir"/usr/share/man/man1/
	install -m644 ./man/mum* "$pkgdir"/usr/share/man/man1/
}

murmur() {
	pkgdesc="Murmur is the server component of Mumble"
	cd "$builddir"

	install -o murmur -g murmur -dm755 \
		"$subpkgdir"/var/lib/murmur
	install -Dm755 ./release/murmurd \
		"$subpkgdir"/usr/bin/murmurd
	install -Dm644 ./scripts/murmur.ini \
		"$subpkgdir"/etc/murmur.ini

	sed 's/^database=$/database=\/var\/lib\/murmur\/murmur.sqlite/;\
		s/^#uname=$/uname=murmur/;\
		s/^#logfile=murmur.log$/logfile=\/var\/log\/murmur.log/;\
		s/^#pidfile=$/pidfile=\/var\/run\/murmur\/murmur.pid/' \
		-i "$subpkgdir"/etc/murmur.ini

	install -Dm644 ./scripts/murmur.conf \
		"$subpkgdir"/etc/dbus-1/system.d/murmurd.conf
	sed "s/mumble-server/murmur/" \
		-i "$subpkgdir"/etc/dbus-1/system.d/murmurd.conf

	install -Dm755 "$srcdir"/murmur.initd \
		"$subpkgdir"/etc/init.d/murmur
}

murmur_doc() {
	pkgdesc="Murmur is the server component of Mumble"

	cd "$builddir"
	install -Dm644 ./man/murmurd.1 \
		"$subpkgdir"/usr/share/man/man1/murmurd.1
	install -Dm644 ./LICENSE \
		"$subpkgdir"/usr/share/licenses/murmur/LICENSE
	default_doc
}

sha512sums="f91111194a899149b500a94afcf7cc5b9691c7ce8669f07fca2c66adbb3916ddb863bf703d04fb8387133fb75f3c8edb52974d1acf3febfafa1f73da19946de4  mumble-1.2.19.tar.gz
6a3c78a479c795f91fabd557c34249308e1032be51ee668a9576cb8d2f7028526c4d79895b5053822c05f998e147a0577e801e8a27c9a454a4473193f16de943  CVE-2018-20743.1.patch
9e2b0dcb5ca34aea1607e0561446bced93e13ce296df986855299f7b652e99db8f9504e0dfa6544e8f443996b8a78a912328f4924813a4716028a8323c70d6d0  CVE-2018-20743.2.patch
fcdaf2a3575e3871fe4003b93364a70a7c7029beb64ba5e24931abbe3898b72791848b5cf78ccf48eee5942a37f696a5134d061c2b8d60b66913abd701758330  boost-1.66.patch
c74ade232146a180448cb0027503f59642000bee50613a1fb99162cdc4bc81089ab4e84e51b0bbdac5c176eb52b76e6bd2b3ec790a9148135a1fc050569921c3  murmur.initd"