Name avahi
Description Service Discovery for Linux using mDNS/DNS-SD (compatible with Bonjour)
Version 1:0.9rc3-1
Package Base avahi
Homepage https://github.com/avahi/avahi
Maintainers ['Jan Alexander Steffens (heftig) <heftig@archlinux.org>', 'Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>']
Contributors ['Douglas Soares de Andrade <douglas@archlinux.org>', 'Gaetan Bisson <bisson@archlinux.org>']
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/avahi
Sources ['0001-HACK-Install-fixes.patch', 'git+https://github.com/avahi/avahi#tag=v0.9-rc3']
Dependencies ['bash', 'dbus', 'expat', 'gdbm', 'glib2', 'glibc', 'libcap', 'libdaemon', 'libdbus-1.so', 'systemd-libs']
Optional-Dependencies ['gtk3', 'libevent', 'nss-mdns', 'python-dbus', 'python-gobject', 'python-twisted']
Build-Dependencies ['doxygen', 'git', 'glib2-devel', 'gobject-introspection', 'graphviz', 'gtk3', 'libevent', 'python-dbus', 'python-gobject', 'systemd', 'xmltoman']
Provides ['libavahi-client.so', 'libavahi-common.so', 'libavahi-core.so', 'libavahi-glib.so', 'libavahi-gobject.so', 'libavahi-libevent.so', 'libavahi-ui-gtk3.so', 'libdns_sd.so']
Builddate 29-01-2026 06:52:30
Architecture x86_64
Distro-Version
Licenses ['LGPL-2.1-or-later']
Hash 80f782be3169ec56fa91e7cd296d8ca792b31b92ec7a5f9596033ab3ea7c2e16
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=avahi
pkgver=0.9rc3
pkgrel=1
epoch=1
pkgdesc="Service Discovery for Linux using mDNS/DNS-SD (compatible with Bonjour)"
url="https://github.com/avahi/avahi"
license=(LGPL-2.1-or-later)
arch=(x86_64)
depends=(
  bash
  dbus
  expat
  gdbm
  glib2
  glibc
  libcap
  libdaemon
  systemd-libs
)
makedepends=(
  doxygen
  git
  glib2-devel
  gobject-introspection
  graphviz
  gtk3
  libevent
  python-dbus
  python-gobject
  systemd
  xmltoman
)
optdepends=(
  'gtk3: avahi-discover, avahi-discover-standalone, bshell, bssh, bvnc'
  'libevent: libevent bindings'
  'nss-mdns: NSS support for mDNS'
  'python-dbus: avahi-bookmarks, avahi-discover'
  'python-gobject: avahi-bookmarks, avahi-discover'
  'python-twisted: avahi-bookmarks'
)
provides=(
  libavahi-{client,common,core,glib,gobject,libevent,ui-gtk3}.so
  libdns_sd.so
)
backup=(
  etc/avahi/{hosts,avahi-daemon.conf,avahi-{autoip,dnsconf}d.action}
  usr/lib/avahi/service-types.db
)
source=(
  "git+$url#tag=v${pkgver/[a-z]/-&}"
  0001-HACK-Install-fixes.patch
)
b2sums=('e9cfd9aa6da87cab3040b2243e4c4946ce028503c69eac06f1c7d2356e63ed3c469bb354d5fb56cd142e56028a34f16a4069b30951d22cdf17091edd58dbb4fb'
        'a15b00c05cce3b6a1479d88b1393cd955a80c669fed03be5f624a8e8701f22fe327bbd42f7563a532ae8ebc39408f3aedfc982c42a2b6141ccc22af96f16293c')

prepare() {
  cd avahi

  # https://bugs.archlinux.org/task/47822
  git apply -3 ../0001-HACK-Install-fixes.patch

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  local configure_options=(
    --prefix=/usr
    --sysconfdir=/etc
    --localstatedir=/var
    --sbindir=/usr/bin
    --runstatedir=/run
    --disable-mono
    --disable-qt5
    --enable-compat-libdns_sd
    --with-autoipd-group=avahi
    --with-autoipd-user=avahi
    --with-avahi-priv-access-group=network
    --with-distro=archlinux
    --with-systemdsystemunitdir=/usr/lib/systemd/system
    with_dbus_sys=/usr/share/dbus-1/system.d
  )

  cd avahi

  ./configure "${configure_options[@]}"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  depends+=(libdbus-1.so)

  cd avahi
  make DESTDIR="$pkgdir" install

  echo 'u avahi - "Avahi mDNS/DNS-SD daemon"' |
    install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
}

# vim:set sw=2 sts=-1 et: