summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-05-05 15:01:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-07 12:15:59 +0100
commitcca4eebd030c3d568a28b33c7adc17681a1866bd (patch)
treed932deebd8b5c1f6343e918e7372cb6e016a90ee /meta/recipes-connectivity/avahi
parente68b8c3598d862e403b6025a4fc3b470b8d01323 (diff)
downloadpoky-cca4eebd030c3d568a28b33c7adc17681a1866bd.tar.gz
avahi: merge avahi-ui into the main recipe
The split was building the same code twice, awkward to maintain, and causing issues with upgrades. Disabling the gtk bits can be easily done through the standard PACKAGECONFIG mechanism when needed. (From OE-Core rev: 33cfebfed51166e409cbb05ab7bbc3fff7c7f36d) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/avahi')
-rw-r--r--meta/recipes-connectivity/avahi/avahi-ui_0.7.bb54
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc86
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.7.bb98
3 files changed, 95 insertions, 143 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb b/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
deleted file mode 100644
index 1510a0ef4f..0000000000
--- a/meta/recipes-connectivity/avahi/avahi-ui_0.7.bb
+++ /dev/null
@@ -1,54 +0,0 @@
1require avahi.inc
2
3inherit features_check
4ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
5
6DEPENDS += "avahi"
7
8AVAHI_GTK = "gtk3"
9
10S = "${WORKDIR}/avahi-${PV}"
11
12PACKAGES += "${PN}-utils avahi-discover"
13
14FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
15FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
16FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
17 ${datadir}/avahi/interfaces/avahi-discover.ui \
18 ${bindir}/avahi-discover-standalone \
19 "
20
21do_install_append () {
22 rm ${D}${sysconfdir} -rf
23 if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then
24 if [ "${nonarch_base_libdir}" != "${base_libdir}" ];then
25 rm ${D}${nonarch_base_libdir} -rf
26 fi
27 else
28 rm ${D}${base_libdir} -rf
29 fi
30 rm ${D}${systemd_unitdir} -rf
31 # The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
32 # but not ${base_libdir} here. And the /lib may not exist
33 # whithout systemd.
34 [ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
35 rm ${D}${bindir}/avahi-b*
36 rm ${D}${bindir}/avahi-p*
37 rm ${D}${bindir}/avahi-r*
38 rm ${D}${bindir}/avahi-s*
39 rm ${D}${includedir}/avahi-c* -rf
40 rm ${D}${includedir}/avahi-g* -rf
41 rm ${D}${libdir}/libavahi-c*
42 rm ${D}${libdir}/libavahi-g*
43 rm ${D}${libdir}/pkgconfig/avahi-c*
44 rm ${D}${libdir}/pkgconfig/avahi-g*
45 rm ${D}${sbindir} -rf
46 rm ${D}${datadir}/avahi/a*
47 rm ${D}${datadir}/locale/ -rf
48 rm ${D}${datadir}/dbus* -rf
49 rm ${D}${mandir}/man1/a*
50 rm ${D}${mandir}/man5 -rf
51 rm ${D}${mandir}/man8 -rf
52 rm ${D}${libdir}/girepository-1.0/ -rf
53 rm ${D}${datadir}/gir-1.0/ -rf
54}
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
deleted file mode 100644
index 94fe6a16b6..0000000000
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ /dev/null
@@ -1,86 +0,0 @@
1SUMMARY = "Avahi IPv4LL network address configuration daemon"
2DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \
3allows programs to publish and discover services and hosts running on a local network \
4with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \
5IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \
6configuration from the link-local 169.254.0.0/16 range without the need for a central \
7server.'
8AUTHOR = "Lennart Poettering <lennart@poettering.net>"
9HOMEPAGE = "http://avahi.org"
10BUGTRACKER = "https://github.com/lathiat/avahi/issues"
11SECTION = "network"
12
13# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
14# python scripts are under GPLv2+
15LICENSE = "GPLv2+ & LGPLv2.1+"
16LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
17 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
18 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
19 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
20 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
21
22SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
23 file://fix-CVE-2017-6519.patch \
24 "
25
26UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
27SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
28SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
29
30DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
31
32# For gtk related PACKAGECONFIGs: gtk, gtk3
33AVAHI_GTK ?= ""
34
35PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
36PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
37PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
38PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
39PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus"
40
41inherit autotools pkgconfig gettext gobject-introspection
42
43EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
44 --disable-stack-protector \
45 --disable-gdbm \
46 --disable-mono \
47 --disable-monodoc \
48 --disable-qt3 \
49 --disable-qt4 \
50 --disable-python \
51 --disable-doxygen-doc \
52 --enable-manpages \
53 ${EXTRA_OECONF_SYSVINIT} \
54 ${EXTRA_OECONF_SYSTEMD} \
55 "
56
57# The distro choice determines what init scripts are installed
58EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
59EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
60
61do_configure_prepend() {
62 sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
63
64 # This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes
65 rm "${S}/common/introspection.m4" || true
66}
67
68do_compile_prepend() {
69 export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
70}
71
72RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
73
74do_install() {
75 autotools_do_install
76 rm -rf ${D}/run
77 rm -rf ${D}${datadir}/dbus-1/interfaces
78 test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
79 rm -rf ${D}${libdir}/avahi
80}
81
82PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}"
83
84FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*"
85
86RPROVIDES_libavahi-compat-libdnssd = "libdns-sd"
diff --git a/meta/recipes-connectivity/avahi/avahi_0.7.bb b/meta/recipes-connectivity/avahi/avahi_0.7.bb
index 24523c7f81..b25cffa3cd 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.7.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.7.bb
@@ -1,4 +1,89 @@
1require avahi.inc 1SUMMARY = "Avahi IPv4LL network address configuration daemon"
2DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \
3allows programs to publish and discover services and hosts running on a local network \
4with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \
5IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \
6configuration from the link-local 169.254.0.0/16 range without the need for a central \
7server.'
8AUTHOR = "Lennart Poettering <lennart@poettering.net>"
9HOMEPAGE = "http://avahi.org"
10BUGTRACKER = "https://github.com/lathiat/avahi/issues"
11SECTION = "network"
12
13# major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
14# python scripts are under GPLv2+
15LICENSE = "GPLv2+ & LGPLv2.1+"
16LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
17 file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
18 file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
19 file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
20 file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
21
22SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
23 file://fix-CVE-2017-6519.patch \
24 "
25
26UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
27SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6"
28SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804"
29
30DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
31
32# For gtk related PACKAGECONFIGs: gtk, gtk3
33AVAHI_GTK ?= "gtk3"
34
35PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
36PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
37PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
38PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
39PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus"
40
41inherit autotools pkgconfig gettext gobject-introspection
42
43EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
44 --disable-stack-protector \
45 --disable-gdbm \
46 --disable-mono \
47 --disable-monodoc \
48 --disable-qt3 \
49 --disable-qt4 \
50 --disable-python \
51 --disable-doxygen-doc \
52 --enable-manpages \
53 ${EXTRA_OECONF_SYSVINIT} \
54 ${EXTRA_OECONF_SYSTEMD} \
55 "
56
57# The distro choice determines what init scripts are installed
58EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
59EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
60
61do_configure_prepend() {
62 sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
63
64 # This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes
65 rm "${S}/common/introspection.m4" || true
66}
67
68do_compile_prepend() {
69 export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
70}
71
72RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns"
73
74do_install() {
75 autotools_do_install
76 rm -rf ${D}/run
77 rm -rf ${D}${datadir}/dbus-1/interfaces
78 test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
79 rm -rf ${D}${libdir}/avahi
80}
81
82PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}"
83
84FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*"
85
86RPROVIDES_libavahi-compat-libdnssd = "libdns-sd"
2 87
3SRC_URI += "file://00avahi-autoipd \ 88SRC_URI += "file://00avahi-autoipd \
4 file://99avahi-autoipd \ 89 file://99avahi-autoipd \
@@ -8,7 +93,13 @@ SRC_URI += "file://00avahi-autoipd \
8 93
9inherit update-rc.d systemd useradd 94inherit update-rc.d systemd useradd
10 95
11PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils" 96PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils avahi-discover avahi-ui"
97
98FILES_avahi-ui = "${libdir}/libavahi-ui*.so.*"
99FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
100 ${datadir}/avahi/interfaces/avahi-discover.ui \
101 ${bindir}/avahi-discover-standalone \
102 "
12 103
13LICENSE_libavahi-gobject = "LGPLv2.1+" 104LICENSE_libavahi-gobject = "LGPLv2.1+"
14LICENSE_avahi-daemon = "LGPLv2.1+" 105LICENSE_avahi-daemon = "LGPLv2.1+"
@@ -46,7 +137,7 @@ FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
46 ${sysconfdir}/init.d/avahi-dnsconfd" 137 ${sysconfdir}/init.d/avahi-dnsconfd"
47FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" 138FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
48FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" 139FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib"
49FILES_avahi-utils = "${bindir}/avahi-*" 140FILES_avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*"
50 141
51RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" 142RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})"
52RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}" 143RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}"
@@ -89,3 +180,4 @@ if [ -z "$D" ]; then
89 killall -q -HUP dbus-daemon || true 180 killall -q -HUP dbus-daemon || true
90fi 181fi
91} 182}
183