summaryrefslogtreecommitdiff
path: root/extra/avahi/PKGBUILD
blob: 7c560097bc72cc350532bc47aeecd28f5acf8449 (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
77
78
79
80
81
# $Id: PKGBUILD 198641 2013-10-31 16:48:15Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=avahi
pkgver=0.6.31
pkgrel=11
pkgdesc='Multicast/unicast DNS-SD framework'
url='http://www.avahi.org/'
license=('LGPL')
arch=('i686' 'x86_64' 'mips64el')
options=('!emptydirs')
depends=('expat' 'libdaemon' 'glib2' 'libcap' 'gdbm' 'dbus')
optdepends=('gtk3: avahi-discover-standalone, bshell, bssh, bvnc'
            'gtk2: gtk2 bindings'
            'qt4: qt4 bindings'
            'pygtk: avahi-bookmarks, avahi-discover'
            'twisted: avahi-bookmarks')
[ "$CARCH" != "mips64el" ] && optdepends+=('mono: mono bindings'
                                           'qt3: qt3 bindings')
optdepends+=('dbus-python: avahi-discover'
            'nss-mdns: NSS support for mDNS')
makedepends=('qt4' 'pygtk' 'intltool' 'python2-dbus'
             'gobject-introspection' 'gtk3' 'xmltoman')
[ "$CARCH" != "mips64el" ] && makedepends+=('mono' 'gtk-sharp-2' 'qt3')
backup=('etc/avahi/hosts'
        'etc/avahi/avahi-daemon.conf'
        'etc/avahi/services/ssh.service'
        'etc/avahi/services/sftp-ssh.service'
        'usr/lib/avahi/service-types.db'
        'usr/share/avahi/service-types')
source=("http://www.avahi.org/download/avahi-${pkgver}.tar.gz")
sha1sums=('7e05bd78572c9088b03b1207a0ad5aba38490684')

conflicts=('howl' 'mdnsresponder')
provides=('howl' 'mdnsresponder')

install=install

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	sed '/^Libs:/s:$: -ldbus-1:' -i avahi-client.pc.in
	sed 's:netdev:network:g' -i avahi-daemon/avahi-dbus.conf
	sed 's:/sbin/resolvconf:/usr/sbin/resolvconf:g' -i */*.action
	sed 's:-DG[^ ]*_DISABLE_DEPRECATED=1::g' -i avahi-ui/Makefile.*
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	export MOC_QT3=/usr/bin/moc-qt3
	export MOC_QT4=/usr/bin/moc-qt4
	export PYTHON=/usr/bin/python2
	[ "$CARCH" = "mips64el" ] && extra="--disable-mono --disable-qt3"

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

	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
	rm -fr "${pkgdir}"/etc/rc.d

	# howl and mdnsresponder compatability
	cd "${pkgdir}"/usr/include; ln -s avahi-compat-libdns_sd/dns_sd.h dns_sd.h; ln -s avahi-compat-howl howl
	cd "${pkgdir}"/usr/lib/pkgconfig; ln -s avahi-compat-howl.pc howl.pc
}