summaryrefslogtreecommitdiff
path: root/repo/avahi/avahi.xibuild
blob: d1e53f4bda5b6b5136b5f72fb4f79d79e200e6ba (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
#!/bin/sh

NAME="avahi"
DESC="multicast/unicast DNS-SD framework"

MAKEDEPS="gdbm intltool gobject-introspection expat libdaemon glib dbus libcap gettext autoconf automake libtool libevent"

PKG_VER=0.8
SOURCE="https://github.com/lathiat/avahi/releases/download/v$PKG_VER/avahi-$PKG_VER.tar.gz"

ADDITIONAL="
CVE-2021-3468.patch
CVE-2021-36217.patch
avahi.pre-install
"

prepare() {
	apply_patches
	autoreconf -vif
}

build() {
	# we dont build autoipd since dhcpcd does same job
	LDFLAGS="$LDFLAGS -lintl" \
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-autoipd \
		--disable-qt3 \
		--disable-qt4 \
		--disable-qt5 \
		--disable-gtk \
		--disable-gtk3 \
		--disable-mono \
		--disable-monodoc \
		--disable-doxygen-doc \
		--disable-xmltoman \
		--enable-compat-libdns_sd \
		--enable-compat-howl \
		--disable-python \
		--with-dbus-sys=/usr/share/dbus-1/system.d \
		--with-distro="gentoo"
	make
}

check() {
	make check
}

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

	install -d -o avahi -g avahi "$PKG_DEST"/var/run/avahi-daemon

	ln -s avahi-compat-howl.pc "$PKG_DEST"/usr/lib/pkgconfig/howl.pc
	ln -s avahi-compat-libdns_sd.pc "$PKG_DEST"/usr/lib/pkgconfig/libdns_sd.pc
	ln -s avahi-compat-libdns_sd/dns_sd.h "$PKG_DEST"/usr/include/
}