APKBUILD 3.11 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avahi
Natanael Copa's avatar
Natanael Copa committed
3
pkgver=0.6.30
4
pkgrel=3
Natanael Copa's avatar
Natanael Copa committed
5 6
pkgdesc="A multicast/unicast DNS-SD framework"
url="http://www.avahi.org/"
7
arch="all"
Natanael Copa's avatar
Natanael Copa committed
8 9
license="LGPL"
depends=""
10
depends_dev="gtk+-dev gdbm-dev"
11
makedepends="py-gtk-dev py-dbus-dev intltool gobject-introspection-dev expat-dev
Natanael Copa's avatar
Natanael Copa committed
12 13 14 15 16 17
	libdaemon-dev glib-dev dbus-dev libcap-dev gdbm-dev gtk+-dev py-gdbm"
install="$pkgname.pre-install"
pkgusers="avahi"
pkggroups="avahi"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools $pkgname-ui-tools:uitools
	$pkgname-glib $pkgname-ui $pkgname-libs $pkgname-compat-howl:howl
18
	$pkgname-compat-libdns_sd:lidns_sd"
Natanael Copa's avatar
Natanael Copa committed
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
source="http://www.avahi.org/download/avahi-$pkgver.tar.gz
	gnome-nettool.png"

_builddir="$srcdir"/$pkgname-$pkgver
build () 
{ 
	cd "$srcdir/$pkgname-$pkgver"
	# we dont build autoipd since dhcpcd does same job
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-autoipd \
		--disable-qt3 \
		--disable-qt4 \
		--disable-gtk3 \
		--disable-mono \
		--disable-monodoc \
		--disable-doxygen-doc \
		--disable-xmltoman \
		--enable-compat-libdns_sd \
		--enable-compat-howl \
		--with-distro="gentoo" \
		--with-systemdsystemunitdir=/lib/systemd/system
	make
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	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/
}

55 56 57 58 59
dev() {
	default_dev
	rm -f "$subpkgdir"/usr/lib/*.la
}

Natanael Copa's avatar
Natanael Copa committed
60 61 62 63 64 65 66 67 68 69
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/
}

uitools() {
	pkgdesc="UI tools for mDNS browsing"
70
	depends="py-gtk py-dbus py-gdbm"
Natanael Copa's avatar
Natanael Copa committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
	mkdir -p "$subpkgdir"/usr/bin
	cd "$pkgdir"/usr/bin
	mv avahi-bookmarks avahi-discover avahi-discover-standalone b* \
		"$subpkgdir"/usr/bin/
  	install -D -m 644 "$srcdir"/gnome-nettool.png \
		"$subpkgdir"/usr/share/pixmaps/gnome-nettool.png
}

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/
}

ui() {
	pkgdesc="Gtk user interface library for Avahi"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libavahi-ui.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/
}

Natanael Copa's avatar
Natanael Copa committed
117
md5sums="e4db89a2a403ff4c47d66ac66fad1f43  avahi-0.6.30.tar.gz
Natanael Copa's avatar
Natanael Copa committed
118
42c2905307c7a5dc6ac4b75f4c3d65a3  gnome-nettool.png"