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

                                                   
          
        
                                              
                            
          
                           

                 
                      


                                                    

                                             
                              

                                                                   
                                                        
         
                                                                                        
                           
                            
         
 
           

                      

                     


                        

                      
 
           
                       
                       

 
         
                                                          
                                   



                                 




                                      
                               
                               






                                           
                                  
                                      


            
         


                  
           
                                      
 
                                                                   


                                                                                




                                                                     
 





                                                                   

                                                              
 





                                                         

                                                  
 








                                                        
 






                                                                         
 




                                             


                                                                                                                                                     
                                                                                                                                                      
 
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avahi
pkgver=0.8
pkgrel=4
pkgdesc="A multicast/unicast DNS-SD framework"
url="https://www.avahi.org/"
arch="all"
license="LGPL-2.0-or-later"
pkgusers="avahi"
pkggroups="avahi"
depends_dev="gdbm-dev"
makedepends="$depends_dev
	intltool gobject-introspection-dev expat-dev
	libdaemon-dev glib-dev dbus-dev libcap-dev
	gettext-dev autoconf automake libtool
	libevent-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools $pkgname-glib
	$pkgname-libs $pkgname-compat-howl:howl
	$pkgname-compat-libdns_sd:lidns_sd $pkgname-lang
	"
source="https://github.com/lathiat/avahi/releases/download/v$pkgver/avahi-$pkgver.tar.gz
	CVE-2021-3468.patch
	CVE-2021-36217.patch
	"

# secfixes:
#   0.8-r2:
#     - CVE-2021-36217
#   0.8-r1:
#     - CVE-2021-3468
#   0.7-r2:
#     - CVE-2017-6519
#     - CVE-2018-1000845
#   0:
#     - CVE-2021-26720

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	# we dont build autoipd since dhcpcd does same job
	LDFLAGS="$LDFLAGS -lintl" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-autoipd \
		--disable-qt3 \
		--disable-qt4 \
		--disable-qt5 \
		--disable-gtk \
		--disable-gtk3 \
		--disable-mono \
		--disable-monodoc \
		--disable-doxygen-doc \
		--disable-xmltoman \
		--enable-compat-libdns_sd \
		--enable-compat-howl \
		--disable-python \
		--with-distro="gentoo"
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	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/
}

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/
}

sha512sums="
c6ba76feb6e92f70289f94b3bf12e5f5c66c11628ce0aeb3cadfb72c13a5d1a9bd56d71bdf3072627a76cd103b9b056d9131aa49ffe11fa334c24ab3b596c7de  avahi-0.8.tar.gz
743430a532b8ec246672cd0997b7831efc15c461cbfe0461faac5d6525293297efb7c06f759b2bcd71d1842ba165464fd334508534e6c247211d613061c49da5  CVE-2021-3468.patch
9e4688ffd8e512c0f614fd24fff2a2a1c66e009069229a6f81dcd382edfff5a8635e0551533c7f9271973a87e62e199fdb34a5560dab27c0a328f531c94f757d  CVE-2021-36217.patch
"