diff options
-rw-r--r-- | meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 87 | ||||
-rw-r--r-- | meta-networking/recipes-support/dnsmasq/dnsmasq_2.88.bb | 90 |
2 files changed, 86 insertions, 91 deletions
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc deleted file mode 100644 index a8ff21a125..0000000000 --- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server" | ||
2 | HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html" | ||
3 | SECTION = "net" | ||
4 | # GPLv3 was added in version 2.41 as license option | ||
5 | LICENSE = "GPL-2.0-only | GPL-3.0-only" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
7 | file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
8 | " | ||
9 | |||
10 | #at least versions 2.69 and prior are moved to the archive folder on the server | ||
11 | SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \ | ||
12 | file://init \ | ||
13 | file://dnsmasq.conf \ | ||
14 | file://dnsmasq-resolvconf.service \ | ||
15 | file://dnsmasq-noresolvconf.service \ | ||
16 | file://dnsmasq-resolved.conf \ | ||
17 | " | ||
18 | |||
19 | inherit pkgconfig update-rc.d systemd | ||
20 | |||
21 | INITSCRIPT_NAME = "dnsmasq" | ||
22 | INITSCRIPT_PARAMS = "defaults" | ||
23 | |||
24 | PACKAGECONFIG ?= "" | ||
25 | PACKAGECONFIG[dbus] = ",,dbus" | ||
26 | PACKAGECONFIG[idn] = ",,libidn" | ||
27 | PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack" | ||
28 | PACKAGECONFIG[lua] = ",,lua" | ||
29 | PACKAGECONFIG[resolvconf] = ",,,resolvconf" | ||
30 | EXTRA_OEMAKE = "\ | ||
31 | 'COPTS=${@bb.utils.contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \ | ||
32 | ${@bb.utils.contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \ | ||
33 | ${@bb.utils.contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \ | ||
34 | ${@bb.utils.contains('PACKAGECONFIG', 'lua', '-DHAVE_LUASCRIPT', '', d)}' \ | ||
35 | 'CFLAGS=${CFLAGS}' \ | ||
36 | 'LDFLAGS=${LDFLAGS}' \ | ||
37 | " | ||
38 | |||
39 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}" | ||
40 | |||
41 | do_compile:append() { | ||
42 | # build dhcp_release | ||
43 | cd ${S}/contrib/lease-tools | ||
44 | oe_runmake | ||
45 | } | ||
46 | |||
47 | do_install () { | ||
48 | oe_runmake "PREFIX=${D}${prefix}" \ | ||
49 | "BINDIR=${D}${bindir}" \ | ||
50 | "MANDIR=${D}${mandir}" \ | ||
51 | install | ||
52 | install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d | ||
53 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ | ||
54 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq | ||
55 | |||
56 | install -d ${D}${systemd_unitdir}/system | ||
57 | |||
58 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then | ||
59 | install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service | ||
60 | else | ||
61 | install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service | ||
62 | fi | ||
63 | install -d ${D}${sysconfdir}/systemd/resolved.conf.d/ | ||
64 | install -m 0644 ${WORKDIR}/dnsmasq-resolved.conf ${D}${sysconfdir}/systemd/resolved.conf.d/ | ||
65 | |||
66 | install -m 0755 ${S}/contrib/lease-tools/dhcp_release ${D}${bindir} | ||
67 | |||
68 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'dbus', d)}" ]; then | ||
69 | install -d ${D}${sysconfdir}/dbus-1/system.d | ||
70 | install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/ | ||
71 | fi | ||
72 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then | ||
73 | install -d ${D}${sysconfdir}/resolvconf/update.d/ | ||
74 | install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq | ||
75 | |||
76 | install -d ${D}${sysconfdir}/default/volatiles | ||
77 | install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles | ||
78 | install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir} | ||
79 | fi | ||
80 | } | ||
81 | |||
82 | CONFFILES:${PN} = "${sysconfdir}/dnsmasq.conf" | ||
83 | |||
84 | RPROVIDES:${PN} += "${PN}-systemd" | ||
85 | RREPLACES:${PN} += "${PN}-systemd" | ||
86 | RCONFLICTS:${PN} += "${PN}-systemd" | ||
87 | SYSTEMD_SERVICE:${PN} = "dnsmasq.service" | ||
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.88.bb b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.88.bb index 52ee9aa96e..43d48490a8 100644 --- a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.88.bb +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.88.bb | |||
@@ -1,7 +1,89 @@ | |||
1 | require dnsmasq.inc | 1 | SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server" |
2 | HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html" | ||
3 | SECTION = "net" | ||
4 | # GPLv3 was added in version 2.41 as license option | ||
5 | LICENSE = "GPL-2.0-only | GPL-3.0-only" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
7 | file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
8 | " | ||
2 | 9 | ||
3 | SRC_URI[dnsmasq-2.88.sha256sum] = "da9d26aa3f3fc15f3b58b94edbb9ddf744cbce487194ea480bd8e7381b3ca028" | 10 | #at least versions 2.69 and prior are moved to the archive folder on the server |
4 | SRC_URI += "\ | 11 | SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV').split('.')[1]) > 69]}dnsmasq-${PV}.tar.gz \ |
5 | file://lua.patch \ | 12 | file://lua.patch \ |
13 | file://init \ | ||
14 | file://dnsmasq.conf \ | ||
15 | file://dnsmasq-resolvconf.service \ | ||
16 | file://dnsmasq-noresolvconf.service \ | ||
17 | file://dnsmasq-resolved.conf \ | ||
6 | " | 18 | " |
19 | SRC_URI[sha256sum] = "da9d26aa3f3fc15f3b58b94edbb9ddf744cbce487194ea480bd8e7381b3ca028" | ||
7 | 20 | ||
21 | inherit pkgconfig update-rc.d systemd | ||
22 | |||
23 | INITSCRIPT_NAME = "dnsmasq" | ||
24 | INITSCRIPT_PARAMS = "defaults" | ||
25 | |||
26 | PACKAGECONFIG ?= "" | ||
27 | PACKAGECONFIG[dbus] = ",,dbus" | ||
28 | PACKAGECONFIG[idn] = ",,libidn" | ||
29 | PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack" | ||
30 | PACKAGECONFIG[lua] = ",,lua" | ||
31 | PACKAGECONFIG[resolvconf] = ",,,resolvconf" | ||
32 | EXTRA_OEMAKE = "\ | ||
33 | 'COPTS=${@bb.utils.contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \ | ||
34 | ${@bb.utils.contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \ | ||
35 | ${@bb.utils.contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \ | ||
36 | ${@bb.utils.contains('PACKAGECONFIG', 'lua', '-DHAVE_LUASCRIPT', '', d)}' \ | ||
37 | 'CFLAGS=${CFLAGS}' \ | ||
38 | 'LDFLAGS=${LDFLAGS}' \ | ||
39 | " | ||
40 | |||
41 | SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}" | ||
42 | |||
43 | do_compile:append() { | ||
44 | # build dhcp_release | ||
45 | cd ${S}/contrib/lease-tools | ||
46 | oe_runmake | ||
47 | } | ||
48 | |||
49 | do_install () { | ||
50 | oe_runmake "PREFIX=${D}${prefix}" \ | ||
51 | "BINDIR=${D}${bindir}" \ | ||
52 | "MANDIR=${D}${mandir}" \ | ||
53 | install | ||
54 | install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d | ||
55 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ | ||
56 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq | ||
57 | |||
58 | install -d ${D}${systemd_unitdir}/system | ||
59 | |||
60 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then | ||
61 | install -m 0644 ${WORKDIR}/dnsmasq-resolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service | ||
62 | else | ||
63 | install -m 0644 ${WORKDIR}/dnsmasq-noresolvconf.service ${D}${systemd_unitdir}/system/dnsmasq.service | ||
64 | fi | ||
65 | install -d ${D}${sysconfdir}/systemd/resolved.conf.d/ | ||
66 | install -m 0644 ${WORKDIR}/dnsmasq-resolved.conf ${D}${sysconfdir}/systemd/resolved.conf.d/ | ||
67 | |||
68 | install -m 0755 ${S}/contrib/lease-tools/dhcp_release ${D}${bindir} | ||
69 | |||
70 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'dbus', d)}" ]; then | ||
71 | install -d ${D}${sysconfdir}/dbus-1/system.d | ||
72 | install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/ | ||
73 | fi | ||
74 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'resolvconf', d)}" ]; then | ||
75 | install -d ${D}${sysconfdir}/resolvconf/update.d/ | ||
76 | install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq | ||
77 | |||
78 | install -d ${D}${sysconfdir}/default/volatiles | ||
79 | install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles | ||
80 | install -m 0755 ${WORKDIR}/dnsmasq-resolvconf-helper ${D}${bindir} | ||
81 | fi | ||
82 | } | ||
83 | |||
84 | CONFFILES:${PN} = "${sysconfdir}/dnsmasq.conf" | ||
85 | |||
86 | RPROVIDES:${PN} += "${PN}-systemd" | ||
87 | RREPLACES:${PN} += "${PN}-systemd" | ||
88 | RCONFLICTS:${PN} += "${PN}-systemd" | ||
89 | SYSTEMD_SERVICE:${PN} = "dnsmasq.service" | ||