diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-05-05 15:01:12 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-07 12:15:59 +0100 |
commit | cca4eebd030c3d568a28b33c7adc17681a1866bd (patch) | |
tree | d932deebd8b5c1f6343e918e7372cb6e016a90ee /meta/recipes-connectivity/avahi | |
parent | e68b8c3598d862e403b6025a4fc3b470b8d01323 (diff) | |
download | poky-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.bb | 54 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 86 | ||||
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi_0.7.bb | 98 |
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 @@ | |||
1 | require avahi.inc | ||
2 | |||
3 | inherit features_check | ||
4 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | ||
5 | |||
6 | DEPENDS += "avahi" | ||
7 | |||
8 | AVAHI_GTK = "gtk3" | ||
9 | |||
10 | S = "${WORKDIR}/avahi-${PV}" | ||
11 | |||
12 | PACKAGES += "${PN}-utils avahi-discover" | ||
13 | |||
14 | FILES_${PN} = "${libdir}/libavahi-ui*.so.*" | ||
15 | FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*" | ||
16 | FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \ | ||
17 | ${datadir}/avahi/interfaces/avahi-discover.ui \ | ||
18 | ${bindir}/avahi-discover-standalone \ | ||
19 | " | ||
20 | |||
21 | do_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 @@ | |||
1 | SUMMARY = "Avahi IPv4LL network address configuration daemon" | ||
2 | DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \ | ||
3 | allows programs to publish and discover services and hosts running on a local network \ | ||
4 | with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \ | ||
5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ | ||
6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ | ||
7 | server.' | ||
8 | AUTHOR = "Lennart Poettering <lennart@poettering.net>" | ||
9 | HOMEPAGE = "http://avahi.org" | ||
10 | BUGTRACKER = "https://github.com/lathiat/avahi/issues" | ||
11 | SECTION = "network" | ||
12 | |||
13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | ||
14 | # python scripts are under GPLv2+ | ||
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
16 | LIC_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 | |||
22 | SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \ | ||
23 | file://fix-CVE-2017-6519.patch \ | ||
24 | " | ||
25 | |||
26 | UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/" | ||
27 | SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6" | ||
28 | SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804" | ||
29 | |||
30 | DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native" | ||
31 | |||
32 | # For gtk related PACKAGECONFIGs: gtk, gtk3 | ||
33 | AVAHI_GTK ?= "" | ||
34 | |||
35 | PACKAGECONFIG ??= "dbus ${AVAHI_GTK}" | ||
36 | PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" | ||
37 | PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+" | ||
38 | PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3" | ||
39 | PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus" | ||
40 | |||
41 | inherit autotools pkgconfig gettext gobject-introspection | ||
42 | |||
43 | EXTRA_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 | ||
58 | EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}" | ||
59 | EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}" | ||
60 | |||
61 | do_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 | |||
68 | do_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 | |||
72 | RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns" | ||
73 | |||
74 | do_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 | |||
82 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}" | ||
83 | |||
84 | FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*" | ||
85 | |||
86 | RPROVIDES_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 @@ | |||
1 | require avahi.inc | 1 | SUMMARY = "Avahi IPv4LL network address configuration daemon" |
2 | DESCRIPTION = 'Avahi is a fully LGPL framework for Multicast DNS Service Discovery. It \ | ||
3 | allows programs to publish and discover services and hosts running on a local network \ | ||
4 | with no specific configuration. This tool implements IPv4LL, "Dynamic Configuration of \ | ||
5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ | ||
6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ | ||
7 | server.' | ||
8 | AUTHOR = "Lennart Poettering <lennart@poettering.net>" | ||
9 | HOMEPAGE = "http://avahi.org" | ||
10 | BUGTRACKER = "https://github.com/lathiat/avahi/issues" | ||
11 | SECTION = "network" | ||
12 | |||
13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | ||
14 | # python scripts are under GPLv2+ | ||
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
16 | LIC_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 | |||
22 | SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \ | ||
23 | file://fix-CVE-2017-6519.patch \ | ||
24 | " | ||
25 | |||
26 | UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/" | ||
27 | SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6" | ||
28 | SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804" | ||
29 | |||
30 | DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native" | ||
31 | |||
32 | # For gtk related PACKAGECONFIGs: gtk, gtk3 | ||
33 | AVAHI_GTK ?= "gtk3" | ||
34 | |||
35 | PACKAGECONFIG ??= "dbus ${AVAHI_GTK}" | ||
36 | PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" | ||
37 | PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+" | ||
38 | PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3" | ||
39 | PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus" | ||
40 | |||
41 | inherit autotools pkgconfig gettext gobject-introspection | ||
42 | |||
43 | EXTRA_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 | ||
58 | EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}" | ||
59 | EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}" | ||
60 | |||
61 | do_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 | |||
68 | do_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 | |||
72 | RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns" | ||
73 | |||
74 | do_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 | |||
82 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", "libavahi-compat-libdnssd", "", d)}" | ||
83 | |||
84 | FILES_libavahi-compat-libdnssd = "${libdir}/libdns_sd.so.*" | ||
85 | |||
86 | RPROVIDES_libavahi-compat-libdnssd = "libdns-sd" | ||
2 | 87 | ||
3 | SRC_URI += "file://00avahi-autoipd \ | 88 | SRC_URI += "file://00avahi-autoipd \ |
4 | file://99avahi-autoipd \ | 89 | file://99avahi-autoipd \ |
@@ -8,7 +93,13 @@ SRC_URI += "file://00avahi-autoipd \ | |||
8 | 93 | ||
9 | inherit update-rc.d systemd useradd | 94 | inherit update-rc.d systemd useradd |
10 | 95 | ||
11 | PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils" | 96 | PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils avahi-discover avahi-ui" |
97 | |||
98 | FILES_avahi-ui = "${libdir}/libavahi-ui*.so.*" | ||
99 | FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \ | ||
100 | ${datadir}/avahi/interfaces/avahi-discover.ui \ | ||
101 | ${bindir}/avahi-discover-standalone \ | ||
102 | " | ||
12 | 103 | ||
13 | LICENSE_libavahi-gobject = "LGPLv2.1+" | 104 | LICENSE_libavahi-gobject = "LGPLv2.1+" |
14 | LICENSE_avahi-daemon = "LGPLv2.1+" | 105 | LICENSE_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" |
47 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | 138 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" |
48 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" | 139 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" |
49 | FILES_avahi-utils = "${bindir}/avahi-*" | 140 | FILES_avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*" |
50 | 141 | ||
51 | RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" | 142 | RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" |
52 | RDEPENDS_${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}" | 143 | RDEPENDS_${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 |
90 | fi | 181 | fi |
91 | } | 182 | } |
183 | |||