aboutsummaryrefslogtreecommitdiffstats
path: root/main/avahi/APKBUILD
blob: eebbaaedde300dcacc40264c90537a21fe032649 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avahi
pkgver=0.7
pkgrel=5
pkgdesc="A multicast/unicast DNS-SD framework"
url="https://www.avahi.org/"
arch="all"
license="LGPL-2.0-or-later"
pkgusers="avahi"
pkggroups="avahi"
depends_dev="gdbm-dev"
makedepends="$depends_dev
	intltool gobject-introspection-dev expat-dev
	libdaemon-dev glib-dev dbus-dev libcap-dev
	gettext-dev autoconf automake libtool"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools $pkgname-glib
	$pkgname-libs $pkgname-compat-howl:howl
	$pkgname-compat-libdns_sd:lidns_sd $pkgname-lang
	"
source="https://github.com/lathiat/avahi/releases/download/v$pkgver/avahi-$pkgver.tar.gz
	CVE-2017-6519-and-CVE-2018-1000845.patch
	CVE-2021-3468.patch
	"

# secfixes:
#   0.8-r1:
#     - CVE-2021-3468
#   0.7-r2:
#     - CVE-2017-6519
#     - CVE-2018-1000845
#   0:
#     - CVE-2021-26720

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	# 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 \
		--disable-python \
		--with-distro="gentoo"
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

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

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

sha512sums="
bae5a1e9204aca90b90e7fd223d19e809e3514d03ba5fa2da1e55bf1d72d3d3b98567f357900c36393613dc17dc98e15ff3ebf0f226f2f6b9766e592452a6ce7  avahi-0.7.tar.gz
dc5c9fde8d1244e70e3cf1c09bc274b094458d2fad982f5a79bcbf3cbddc43a0cf79e9ba106b3b0446a6f0b006fd3beeee48a03bd3d8a06cf8d9821f6945ffed  CVE-2017-6519-and-CVE-2018-1000845.patch
743430a532b8ec246672cd0997b7831efc15c461cbfe0461faac5d6525293297efb7c06f759b2bcd71d1842ba165464fd334508534e6c247211d613061c49da5  CVE-2021-3468.patch
"