1 # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
2 # Contributor: Gaetan Bisson <bisson@archlinux.org>
3 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
8 pkgdesc='Service Discovery for Linux using mDNS/DNS-SD -- compatible with Bonjour'
9 url='https://github.com/lathiat/avahi'
12 depends=(expat libdaemon glib2 libcap gdbm dbus)
13 makedepends=(git gobject-introspection gtk3 qt5-base xmltoman python-dbus
14 python-gobject doxygen graphviz libevent)
15 optdepends=('gtk3: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc'
16 'qt5-base: qt5 bindings'
17 'libevent: libevent bindings'
18 'nss-mdns: NSS support for mDNS'
19 'python-twisted: avahi-bookmarks'
20 'python-gobject: avahi-bookmarks, avahi-discover'
21 'python-dbus: avahi-bookmarks, avahi-discover')
22 provides=(libavahi-client.so libavahi-common.so libavahi-core.so
23 libavahi-glib.so libavahi-gobject.so libavahi-libevent.so
24 libavahi-qt5.so libavahi-ui-gtk3.so libdns_sd.so)
25 backup=(etc/avahi/{hosts,avahi-daemon.conf,avahi-{autoip,dnsconf}d.action}
26 usr/lib/avahi/service-types.db)
27 _commit=fd482a74625b8db8547b8cfca3ee3d3c6c721423 # master
28 source=("git+https://github.com/lathiat/avahi#commit=$_commit"
30 0001-Fix-avahi-browse-Invalid-service-type.patch)
32 '26b1e74450944f5c4385d2f5df18523cfb953e4138f6d9e81061a626453e40d8ed2dee44535cfbb547848eefb3cdca408009d5f0e0c465f144a8803db8593b46'
33 'e39c17d9a5d534784a3c7b6947da994d0ab5fa354aac5cecde6d3baaa2bb3d57f02f91cc6fb68885a4e98f44efe615b01631a4c7af752aa26f35082cfcc0ddd7')
37 git describe --tags | sed 's/^v//;s/-/+/g'
43 # https://bugs.archlinux.org/task/68518
44 # https://github.com/lathiat/avahi/pull/282
45 git apply -3 ../282.patch
47 # https://bugs.archlinux.org/task/71781
48 # https://github.com/lathiat/avahi/issues/212
49 git apply -3 ../0001-Fix-avahi-browse-Invalid-service-type.patch
51 NOCONFIGURE=1 ./autogen.sh
60 --localstatedir=/var \
62 with_dbus_sys=/usr/share/dbus-1/system.d \
64 --enable-compat-libdns_sd \
65 --with-distro=archlinux \
66 --with-avahi-priv-access-group=network \
67 --with-autoipd-user=avahi \
68 --with-autoipd-group=avahi \
69 --with-systemdsystemunitdir=/usr/lib/systemd/system
70 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
76 depends+=(libdbus-1.so)
79 make DESTDIR="$pkgdir" install
83 # mdnsresponder compat
84 ln -s avahi-compat-libdns_sd/dns_sd.h "$pkgdir/usr/include/dns_sd.h"
86 # move example services https://bugs.archlinux.org/task/47822
87 install -d "$pkgdir/usr/share/doc/$pkgname"
88 mv "$pkgdir"/etc/avahi/services/{,sftp-}ssh.service \
89 "$pkgdir/usr/share/doc/$pkgname/"
91 echo 'u avahi - "Avahi mDNS/DNS-SD daemon"' |
92 install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"