summaryrefslogtreecommitdiffstats
path: root/abs/core/avahi/PKGBUILD
blob: 5aa2247a639534776089adb23a3c4f5f89e88000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# $Id$
# 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.6.32
pkgrel=2
_commit=4f334990f692ce08ab4ea2eece695f1592f535b2
pkgdesc='Service Discovery for Linux using mDNS/DNS-SD -- compatible with Bonjour'
url='https://github.com/lathiat/avahi'
license=(LGPL)
arch=(i686 x86_64)
depends=(expat libdaemon glib2 libcap gdbm dbus)
makedepends=(git qt4 pygtk mono intltool python2-dbus gtk-sharp-2 gobject-introspection gtk3
             xmltoman)
optdepends=('gtk3: avahi-discover-standalone, bshell, bssh, bvnc'
            'gtk2: gtk2 bindings'
            'qt4: qt4 bindings'
            'pygtk: avahi-bookmarks, avahi-discover'
            'python2-twisted: avahi-bookmarks'
            'mono: mono bindings'
            'python2-dbus: avahi-discover'
            'nss-mdns: NSS support for mDNS')
install=avahi.install
backup=(etc/avahi/{hosts,avahi-daemon.conf}
        usr/lib/avahi/service-types.db usr/share/avahi/service-types)
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')


prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  export MOC_QT4=/usr/bin/moc-qt4 PYTHON=/usr/bin/python2

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --sbindir=/usr/bin \
    --disable-monodoc \
    --disable-qt3 \
    --enable-compat-libdns_sd \
    --with-distro=archlinux \
    --with-avahi-priv-access-group=network \
    --with-autoipd-user=avahi \
    --with-autoipd-group=avahi \
    --with-systemdsystemunitdir=/usr/lib/systemd/system

  cp -a avahi-python/avahi avahi-python/avahi3

  make
  make -C avahi-python/avahi3 PYTHON=/usr/bin/python2
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  make DESTDIR="$pkgdir" -C avahi-python/avahi3 install \
    PYTHON=/usr/bin/python2 pythondir=/usr/lib/python2.7/site-packages

  # mdnsresponder compat
  ln -s avahi-compat-libdns_sd/dns_sd.h "$pkgdir/usr/include/dns_sd.h"

  # move example services https://bugs.archlinux.org/task/47822
  install -d "$pkgdir/usr/share/doc/$pkgname"
  mv "$pkgdir"/etc/avahi/services/{,sftp-}ssh.service \
    "$pkgdir/usr/share/doc/$pkgname/"

  rmdir "$pkgdir"/var{/run,}
}