diff options
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi.inc')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 84 |
1 files changed, 11 insertions, 73 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc index ec368de4f4..11846849f0 100644 --- a/meta/recipes-connectivity/avahi/avahi.inc +++ b/meta/recipes-connectivity/avahi/avahi.inc | |||
@@ -13,15 +13,19 @@ SECTION = "network" | |||
13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | 13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and |
14 | # python scripts are under GPLv2+ | 14 | # python scripts are under GPLv2+ |
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | 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" | ||
16 | 21 | ||
17 | DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native" | 22 | SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz" |
18 | 23 | ||
19 | SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \ | ||
20 | file://00avahi-autoipd \ | ||
21 | file://99avahi-autoipd \ | ||
22 | file://initscript.patch \ | ||
23 | " | ||
24 | UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/" | 24 | UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/" |
25 | SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6" | ||
26 | SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804" | ||
27 | |||
28 | DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native" | ||
25 | 29 | ||
26 | # For gtk related PACKAGECONFIGs: gtk, gtk3 | 30 | # For gtk related PACKAGECONFIGs: gtk, gtk3 |
27 | AVAHI_GTK ?= "" | 31 | AVAHI_GTK ?= "" |
@@ -31,18 +35,7 @@ PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" | |||
31 | PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+" | 35 | PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+" |
32 | PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3" | 36 | PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3" |
33 | 37 | ||
34 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" | 38 | inherit autotools pkgconfig gettext gobject-introspection |
35 | USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \ | ||
36 | --no-create-home --shell /bin/false \ | ||
37 | --user-group avahi" | ||
38 | |||
39 | USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \ | ||
40 | --no-create-home --shell /bin/false \ | ||
41 | --user-group \ | ||
42 | -c \"Avahi autoip daemon\" \ | ||
43 | avahi-autoipd" | ||
44 | |||
45 | inherit autotools pkgconfig update-rc.d gettext useradd gobject-introspection | ||
46 | 39 | ||
47 | EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ | 40 | EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ |
48 | --disable-stack-protector \ | 41 | --disable-stack-protector \ |
@@ -73,67 +66,12 @@ do_compile_prepend() { | |||
73 | export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs" | 66 | export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs" |
74 | } | 67 | } |
75 | 68 | ||
76 | PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils" | ||
77 | |||
78 | # As avahi doesn't put any files into PN, clear the files list to avoid problems | ||
79 | # if extra libraries appear. | ||
80 | FILES_${PN} = "" | ||
81 | FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ | ||
82 | ${sysconfdir}/avahi/avahi-autoipd.action \ | ||
83 | ${sysconfdir}/dhcp/*/avahi-autoipd \ | ||
84 | ${sysconfdir}/udhcpc.d/00avahi-autoipd \ | ||
85 | ${sysconfdir}/udhcpc.d/99avahi-autoipd" | ||
86 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" | ||
87 | FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib" | ||
88 | FILES_avahi-daemon = "${sbindir}/avahi-daemon \ | ||
89 | ${sysconfdir}/avahi/avahi-daemon.conf \ | ||
90 | ${sysconfdir}/avahi/hosts \ | ||
91 | ${sysconfdir}/avahi/services \ | ||
92 | ${sysconfdir}/dbus-1 \ | ||
93 | ${sysconfdir}/init.d/avahi-daemon \ | ||
94 | ${datadir}/avahi/introspection/*.introspect \ | ||
95 | ${datadir}/avahi/avahi-service.dtd \ | ||
96 | ${datadir}/avahi/service-types \ | ||
97 | ${datadir}/dbus-1/system-services" | ||
98 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" | ||
99 | FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*" | ||
100 | FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ | ||
101 | ${sysconfdir}/avahi/avahi-dnsconfd.action \ | ||
102 | ${sysconfdir}/init.d/avahi-dnsconfd" | ||
103 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | ||
104 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" | ||
105 | FILES_avahi-utils = "${bindir}/avahi-*" | ||
106 | |||
107 | RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})" | ||
108 | |||
109 | RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns" | ||
110 | RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns" | 69 | RRECOMMENDS_${PN}_append_libc-glibc = " libnss-mdns" |
111 | 70 | ||
112 | CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" | ||
113 | |||
114 | INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" | ||
115 | INITSCRIPT_NAME_avahi-daemon = "avahi-daemon" | ||
116 | INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19" | ||
117 | INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd" | ||
118 | INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19" | ||
119 | |||
120 | do_install() { | 71 | do_install() { |
121 | autotools_do_install | 72 | autotools_do_install |
122 | rm -rf ${D}/run | 73 | rm -rf ${D}/run |
123 | rm -rf ${D}${datadir}/dbus-1/interfaces | 74 | rm -rf ${D}${datadir}/dbus-1/interfaces |
124 | test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1 | 75 | test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1 |
125 | rm -rf ${D}${libdir}/avahi | 76 | rm -rf ${D}${libdir}/avahi |
126 | |||
127 | install -d ${D}${sysconfdir}/udhcpc.d | ||
128 | install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d | ||
129 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d | ||
130 | } | ||
131 | |||
132 | # At the time the postinst runs, dbus might not be setup so only restart if running | ||
133 | # Don't exit early, because update-rc.d needs to run subsequently. | ||
134 | |||
135 | pkg_postinst_avahi-daemon () { | ||
136 | if [ -z "$D" ]; then | ||
137 | killall -q -HUP dbus-daemon || true | ||
138 | fi | ||
139 | } | 77 | } |