aboutsummaryrefslogblamecommitdiffstats
path: root/main/avahi/APKBUILD
blob: df85dd28b314814e36342a3438e547dfb8348043 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                   
             
        

                                              
          
                
          

                                                                     

                                                                   


                              

                                                                   

                                                        
                                                                                        
                        
                                                
         
 
                                   





                        
           
                       
                       

 
         
                      
                                                          



                                 




                                      
                               



                                       
                                 


                                           
                                 
                                        

                                                                 



            
                      





                                                                       
                                                           

 

                   

 







                                                                     







                                                              






















                                                                         




                                                      
                                                                                                                                                                 

                                                                                                                                                                           
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avahi
pkgver=0.6.32
pkgrel=5
pkgdesc="A multicast/unicast DNS-SD framework"
url="http://www.avahi.org/"
arch="all"
license="LGPL2+"
depends=""
depends_dev="gdbm-dev"
makedepends="py-dbus-dev intltool gobject-introspection-dev expat-dev
	libdaemon-dev glib-dev dbus-dev libcap-dev gdbm-dev py-gdbm
	gettext-dev autoconf automake libtool"
install="$pkgname.pre-install"
pkgusers="avahi"
pkggroups="avahi"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools $pkgname-glib
	$pkgname-libs $pkgname-compat-howl:howl
	$pkgname-compat-libdns_sd:lidns_sd $pkgname-lang
	py-avahi:py"
source="https://github.com/lathiat/avahi/releases/download/v$pkgver/avahi-$pkgver.tar.gz
	openrc-run.patch
	CVE-2017-6519-and-CVE-2018-1000845.patch
	"

builddir="$srcdir"/$pkgname-$pkgver

# secfixes:
#   0.6.32-r5:
#     - CVE-2017-6519
#     - CVE-2018-1000845

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	cd "$builddir"
	# we dont build autoipd since dhcpcd does same job
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-autoipd \
		--disable-qt3 \
		--disable-qt4 \
		--disable-gtk \
		--disable-gtk3 \
		--disable-mono \
		--disable-monodoc \
		--disable-doxygen-doc \
		--disable-pygtk \
		--disable-xmltoman \
		--enable-compat-libdns_sd \
		--enable-compat-howl \
		--enable-python \
		--with-distro="gentoo" \
		--with-systemdsystemunitdir=/lib/systemd/system \
		|| return 1
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -d -o avahi -g avahi "$pkgdir"/var/run/avahi-daemon
	ln -s avahi-compat-howl.pc  "$pkgdir"/usr/lib/pkgconfig/howl.pc
	ln -s avahi-compat-libdns_sd.pc \
		"$pkgdir"/usr/lib/pkgconfig/libdns_sd.pc
	ln -s avahi-compat-libdns_sd/dns_sd.h "$pkgdir"/usr/include/
	rm -r "$pkgdir"/usr/bin/avahi-bookmarks || return 1
}

dev() {
	default_dev
}

tools() {
	pkgdesc="Command line tools for mDNS browsing and publishing"
	mkdir -p "$subpkgdir"/usr/bin
	cd "$pkgdir"/usr/bin
	mv avahi-browse* avahi-publish* avahi-resolve* avahi-set* \
		"$subpkgdir"/usr/bin/
}

glib() {
	pkgdesc="Glib libraries and GObject wrapper for avahi"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libavahi-glib.so.* \
		"$pkgdir"/usr/lib/libavahi-gobject.so.* \
		"$subpkgdir"/usr/lib/
}

libs() {
	pkgdesc="Libraries for avahi run-time use"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libavahi-common.so.* \
		"$pkgdir"/usr/lib/libavahi-client.so.* \
		"$subpkgdir"/usr/lib/
}


howl() {
	pkgdesc="Libraries for howl compatibility"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libhowl.so.* \
		"$subpkgdir"/usr/lib/
}

lidns_sd() {
	pkgdesc="Libraries for Apple Bonjour mDNSResponder compatibility"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libdns_sd.so.* \
		"$subpkgdir"/usr/lib/
}

py() {
	pkgdesc="python bindings for avahi"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/py* "$subpkgdir"/usr/lib/
}
sha512sums="6f8d0a64292439cbb989c531a4ba2f25a53ee9cf7ad9df04dedf73149489a92612f3b5955e10aa4b1c76496c34b90ad75590e8aa49468249508267c1c8b899ee  avahi-0.6.32.tar.gz
2754d11bf027676f30de6322eb9251ae83df5ef8f7b354793263224d432514a49e021d8f819f5525eeaeead04b544e15bfd2183ac8bc9f97e871d246e2b6a108  openrc-run.patch
dc5c9fde8d1244e70e3cf1c09bc274b094458d2fad982f5a79bcbf3cbddc43a0cf79e9ba106b3b0446a6f0b006fd3beeee48a03bd3d8a06cf8d9821f6945ffed  CVE-2017-6519-and-CVE-2018-1000845.patch"