diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2018-06-21 14:00:22 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-27 13:55:21 +0100 |
commit | 2b152d36581053b2fa9e81b2cd1664b885c951f0 (patch) | |
tree | 861368084dd1c9860c5fdcd58eb88b28a4878a14 /meta/recipes-connectivity/avahi/avahi_0.7.bb | |
parent | 19c22fc08a9ca778bcf79690cf7f27c3bf372211 (diff) | |
download | poky-2b152d36581053b2fa9e81b2cd1664b885c951f0.tar.gz |
avahi: reorganize codes
This patch does nothing but reorganizing codes.
avahi.inc is shared by avahi and avahi-ui recipes. Move common things
into it, and move uncommon things out of it.
(From OE-Core rev: 75529d384bfeaf52befccb892cf41f22dc02668b)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/avahi/avahi_0.7.bb')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi_0.7.bb | 83 |
1 files changed, 71 insertions, 12 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi_0.7.bb b/meta/recipes-connectivity/avahi/avahi_0.7.bb index 7c91f10f11..b695be9130 100644 --- a/meta/recipes-connectivity/avahi/avahi_0.7.bb +++ b/meta/recipes-connectivity/avahi/avahi_0.7.bb | |||
@@ -1,20 +1,79 @@ | |||
1 | require avahi.inc | 1 | require avahi.inc |
2 | 2 | ||
3 | inherit systemd | 3 | SRC_URI += "file://00avahi-autoipd \ |
4 | file://99avahi-autoipd \ | ||
5 | file://initscript.patch \ | ||
6 | " | ||
7 | |||
8 | inherit update-rc.d systemd useradd | ||
9 | |||
10 | PACKAGES =+ "libavahi-gobject avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils" | ||
11 | |||
12 | # As avahi doesn't put any files into PN, clear the files list to avoid problems | ||
13 | # if extra libraries appear. | ||
14 | FILES_${PN} = "" | ||
15 | FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ | ||
16 | ${sysconfdir}/avahi/avahi-autoipd.action \ | ||
17 | ${sysconfdir}/dhcp/*/avahi-autoipd \ | ||
18 | ${sysconfdir}/udhcpc.d/00avahi-autoipd \ | ||
19 | ${sysconfdir}/udhcpc.d/99avahi-autoipd" | ||
20 | FILES_libavahi-common = "${libdir}/libavahi-common.so.*" | ||
21 | FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib" | ||
22 | FILES_avahi-daemon = "${sbindir}/avahi-daemon \ | ||
23 | ${sysconfdir}/avahi/avahi-daemon.conf \ | ||
24 | ${sysconfdir}/avahi/hosts \ | ||
25 | ${sysconfdir}/avahi/services \ | ||
26 | ${sysconfdir}/dbus-1 \ | ||
27 | ${sysconfdir}/init.d/avahi-daemon \ | ||
28 | ${datadir}/avahi/introspection/*.introspect \ | ||
29 | ${datadir}/avahi/avahi-service.dtd \ | ||
30 | ${datadir}/avahi/service-types \ | ||
31 | ${datadir}/dbus-1/system-services" | ||
32 | FILES_libavahi-client = "${libdir}/libavahi-client.so.*" | ||
33 | FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ | ||
34 | ${sysconfdir}/avahi/avahi-dnsconfd.action \ | ||
35 | ${sysconfdir}/init.d/avahi-dnsconfd" | ||
36 | FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*" | ||
37 | FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" | ||
38 | FILES_avahi-utils = "${bindir}/avahi-*" | ||
39 | |||
40 | RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})" | ||
41 | |||
42 | RRECOMMENDS_avahi-daemon_append_libc-glibc = " libnss-mdns" | ||
43 | |||
44 | CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" | ||
45 | |||
46 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" | ||
47 | USERADD_PARAM_avahi-daemon = "--system --home /run/avahi-daemon \ | ||
48 | --no-create-home --shell /bin/false \ | ||
49 | --user-group avahi" | ||
50 | |||
51 | USERADD_PARAM_avahi-autoipd = "--system --home /run/avahi-autoipd \ | ||
52 | --no-create-home --shell /bin/false \ | ||
53 | --user-group \ | ||
54 | -c \"Avahi autoip daemon\" \ | ||
55 | avahi-autoipd" | ||
56 | |||
57 | INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" | ||
58 | INITSCRIPT_NAME_avahi-daemon = "avahi-daemon" | ||
59 | INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19" | ||
60 | INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd" | ||
61 | INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19" | ||
4 | 62 | ||
5 | SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd" | 63 | SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd" |
6 | SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service" | 64 | SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service" |
7 | SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service" | 65 | SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service" |
8 | 66 | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | 67 | do_install_append() { |
10 | file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \ | 68 | install -d ${D}${sysconfdir}/udhcpc.d |
11 | file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \ | 69 | install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
12 | file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \ | 70 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
13 | file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf" | 71 | } |
14 | |||
15 | SRC_URI[md5sum] = "d76c59d0882ac6c256d70a2a585362a6" | ||
16 | SRC_URI[sha256sum] = "57a99b5dfe7fdae794e3d1ee7a62973a368e91e414bd0dfa5d84434de5b14804" | ||
17 | |||
18 | DEPENDS += "intltool-native" | ||
19 | 72 | ||
20 | PACKAGES =+ "libavahi-gobject" | 73 | # At the time the postinst runs, dbus might not be setup so only restart if running |
74 | # Don't exit early, because update-rc.d needs to run subsequently. | ||
75 | pkg_postinst_avahi-daemon () { | ||
76 | if [ -z "$D" ]; then | ||
77 | killall -q -HUP dbus-daemon || true | ||
78 | fi | ||
79 | } | ||