# Maintainer: Natanael Copa pkgname=avahi pkgver=0.7 pkgrel=0 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="" depends_dev="gdbm-dev" makedepends="py-dbus-dev intltool py-gobject3-dev 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" 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:noarch" source="https://github.com/lathiat/avahi/releases/download/v$pkgver/avahi-$pkgver.tar.gz" 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 make } check() { cd "$builddir" make check } package() { cd "$builddir" 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/ rm -r "$pkgdir"/usr/bin/avahi-bookmarks } 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="bae5a1e9204aca90b90e7fd223d19e809e3514d03ba5fa2da1e55bf1d72d3d3b98567f357900c36393613dc17dc98e15ff3ebf0f226f2f6b9766e592452a6ce7 avahi-0.7.tar.gz"