summaryrefslogtreecommitdiffstats
path: root/main/avahi/APKBUILD
blob: 851233569720a8b52c1194bd3f437c0419095919 (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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avahi
pkgver=0.6.31
pkgrel=7
pkgdesc="A multicast/unicast DNS-SD framework"
url="http://www.avahi.org/"
arch="all"
license="LGPL2+"
depends=""
depends_dev="gdbm-dev"
makedepends="py-dbus-dev intltool gobject-introspection-dev expat-dev
	libdaemon-dev glib-dev dbus-dev libcap-dev gdbm-dev py-gdbm"
install="$pkgname.pre-install"
pkgusers="avahi"
pkggroups="avahi"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools $pkgname-glib
	$pkgname-libs $pkgname-compat-howl:howl
	$pkgname-compat-libdns_sd:lidns_sd $pkgname-lang
	py-avahi:py"
patches="initscripts.patch
	musl-fix.patch"
source="http://www.avahi.org/download/avahi-$pkgver.tar.gz
	$patches
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $patches; do
		patch -p1 -i "$srcdir"/$i || return 1
	done
}

build() {
	cd "$_builddir"
	# we dont build autoipd since dhcpcd does same job
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-autoipd \
		--disable-qt3 \
		--disable-qt4 \
		--disable-gtk \
		--disable-gtk3 \
		--disable-mono \
		--disable-monodoc \
		--disable-doxygen-doc \
		--disable-pygtk \
		--disable-xmltoman \
		--enable-compat-libdns_sd \
		--enable-compat-howl \
		--enable-python \
		--with-distro="gentoo" \
		--with-systemdsystemunitdir=/lib/systemd/system \
		|| return 1
	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/
	rm -r "$pkgdir"/usr/lib/*.la "$pkgdir"/usr/bin/avahi-bookmarks \
		|| return 1
}

dev() {
	default_dev
	rm -f "$subpkgdir"/usr/lib/*.la
}

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

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

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

py() {
	pkgdesc="python bindings for avahi"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/py* "$subpkgdir"/usr/lib/
}


md5sums="2f22745b8f7368ad5a0a3fddac343f2d  avahi-0.6.31.tar.gz
0f8cd64789585731adbeb3e3efd55b21  initscripts.patch
9557450128d0e4324405af2c625dc8c7  musl-fix.patch"
sha256sums="8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48  avahi-0.6.31.tar.gz
a3c9ace33195393b078b7dae2f7e133795012304aaea5541e8c00ba62975d40d  initscripts.patch
c43a60cf9cddb3cc8c88c13d78dbf0c6a7f1e3ff1f73e1305d465547cadd6a58  musl-fix.patch"
sha512sums="53eb00d570a274d841e1e6ad07da077950089ae39b4f7aa21fcd21cc5320b30b506b43e7e57e56198e155cc7bd289b779a48b2b2fc002dc6194a946110451858  avahi-0.6.31.tar.gz
31e1c7f469c80f537672880989eeef6493fa8b667965ca2d5b88dc58ba0e9a156aaf6531a85a0688ced0f6c9865cddf5195fe1b7f678bad4527f4d8ea990b445  initscripts.patch
09ae19b3c8641cdbeaabf1af69852e297d7445dfaf259b43d9de8a04c5d31722ecb2fb921feb44925a5364e69bd514c47be90f532493b087879abf9f53a8fe11  musl-fix.patch"