diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-support/dnsmasq/dnsmasq.inc | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-support/dnsmasq/dnsmasq.inc')
-rw-r--r-- | meta-networking/recipes-support/dnsmasq/dnsmasq.inc | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc new file mode 100644 index 0000000000..e57ab727eb --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc | |||
@@ -0,0 +1,56 @@ | |||
1 | SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server" | ||
2 | HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html" | ||
3 | SECTION = "console/network" | ||
4 | # GPLv3 was added in version 2.41 as license option | ||
5 | LICENSE = "GPLv2 | GPLv3" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
7 | file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504" | ||
8 | |||
9 | #at least versions 2.15 and prior are moved to the archive folder on the server | ||
10 | SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV',1).split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \ | ||
11 | file://init \ | ||
12 | file://dnsmasq.conf \ | ||
13 | file://dnsmasq.service \ | ||
14 | " | ||
15 | |||
16 | inherit update-rc.d systemd | ||
17 | |||
18 | INITSCRIPT_NAME = "dnsmasq" | ||
19 | INITSCRIPT_PARAMS = "defaults" | ||
20 | |||
21 | PACKAGECONFIG ??= "" | ||
22 | PACKAGECONFIG[dbus] = "COPTS=-DHAVE_DBUS,,dbus" | ||
23 | EXTRA_OEMAKE = "${EXTRA_OECONF}" | ||
24 | |||
25 | do_compile_append() { | ||
26 | # build dhcp_release | ||
27 | cd ${S}/contrib/wrt | ||
28 | oe_runmake | ||
29 | } | ||
30 | |||
31 | do_install () { | ||
32 | oe_runmake "PREFIX=${D}${prefix}" \ | ||
33 | "BINDIR=${D}${bindir}" \ | ||
34 | "MANDIR=${D}${mandir}" \ | ||
35 | install | ||
36 | install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d | ||
37 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ | ||
38 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq | ||
39 | |||
40 | install -d ${D}${systemd_unitdir}/system | ||
41 | install -m 0644 ${WORKDIR}/dnsmasq.service ${D}${systemd_unitdir}/system | ||
42 | |||
43 | install -m 0755 ${S}/contrib/wrt/dhcp_release ${D}${bindir} | ||
44 | |||
45 | if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != "" ]; then | ||
46 | install -d ${D}${sysconfdir}/dbus-1/system.d | ||
47 | install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/ | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf" | ||
52 | |||
53 | RPROVIDES_${PN} += "${PN}-systemd" | ||
54 | RREPLACES_${PN} += "${PN}-systemd" | ||
55 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
56 | SYSTEMD_SERVICE_${PN} = "dnsmasq.service" | ||