summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq.inc87
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq_2.88.bb90
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 @@
1SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server"
2HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
3SECTION = "net"
4# GPLv3 was added in version 2.41 as license option
5LICENSE = "GPL-2.0-only | GPL-3.0-only"
6LIC_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
11SRC_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
19inherit pkgconfig update-rc.d systemd
20
21INITSCRIPT_NAME = "dnsmasq"
22INITSCRIPT_PARAMS = "defaults"
23
24PACKAGECONFIG ?= ""
25PACKAGECONFIG[dbus] = ",,dbus"
26PACKAGECONFIG[idn] = ",,libidn"
27PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack"
28PACKAGECONFIG[lua] = ",,lua"
29PACKAGECONFIG[resolvconf] = ",,,resolvconf"
30EXTRA_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
39SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}"
40
41do_compile:append() {
42 # build dhcp_release
43 cd ${S}/contrib/lease-tools
44 oe_runmake
45}
46
47do_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
82CONFFILES:${PN} = "${sysconfdir}/dnsmasq.conf"
83
84RPROVIDES:${PN} += "${PN}-systemd"
85RREPLACES:${PN} += "${PN}-systemd"
86RCONFLICTS:${PN} += "${PN}-systemd"
87SYSTEMD_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 @@
1require dnsmasq.inc 1SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server"
2HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
3SECTION = "net"
4# GPLv3 was added in version 2.41 as license option
5LICENSE = "GPL-2.0-only | GPL-3.0-only"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
7 file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504 \
8 "
2 9
3SRC_URI[dnsmasq-2.88.sha256sum] = "da9d26aa3f3fc15f3b58b94edbb9ddf744cbce487194ea480bd8e7381b3ca028" 10#at least versions 2.69 and prior are moved to the archive folder on the server
4SRC_URI += "\ 11SRC_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"
19SRC_URI[sha256sum] = "da9d26aa3f3fc15f3b58b94edbb9ddf744cbce487194ea480bd8e7381b3ca028"
7 20
21inherit pkgconfig update-rc.d systemd
22
23INITSCRIPT_NAME = "dnsmasq"
24INITSCRIPT_PARAMS = "defaults"
25
26PACKAGECONFIG ?= ""
27PACKAGECONFIG[dbus] = ",,dbus"
28PACKAGECONFIG[idn] = ",,libidn"
29PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack"
30PACKAGECONFIG[lua] = ",,lua"
31PACKAGECONFIG[resolvconf] = ",,,resolvconf"
32EXTRA_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
41SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq file://dnsmasq-resolvconf-helper', '', d)}"
42
43do_compile:append() {
44 # build dhcp_release
45 cd ${S}/contrib/lease-tools
46 oe_runmake
47}
48
49do_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
84CONFFILES:${PN} = "${sysconfdir}/dnsmasq.conf"
85
86RPROVIDES:${PN} += "${PN}-systemd"
87RREPLACES:${PN} += "${PN}-systemd"
88RCONFLICTS:${PN} += "${PN}-systemd"
89SYSTEMD_SERVICE:${PN} = "dnsmasq.service"