summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcp/dhcp4.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp4.inc')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp4.inc57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp4.inc b/meta/recipes-connectivity/dhcp/dhcp4.inc
new file mode 100644
index 0000000000..7652b948f0
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp4.inc
@@ -0,0 +1,57 @@
1SECTION = "console/network"
2DESCRIPTION = "Internet Software Consortium DHCP package"
3HOMEPAGE = "http://www.isc.org/"
4
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74"
7
8SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-${PV}.tar.gz \
9 file://site.h \
10 file://init-relay file://default-relay \
11 file://init-server file://default-server \
12 file://dhclient.conf file://dhcpd.conf"
13
14inherit autotools
15
16TARGET_CFLAGS += "-D_GNU_SOURCE"
17EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
18 --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
19 --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
20 --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases"
21
22do_compile_prepend () {
23 cp -f ${WORKDIR}/site.h ${S}/includes
24}
25
26do_install_append () {
27 install -d ${D}${sysconfdir}/init.d
28 install -d ${D}${sysconfdir}/default
29 install -d ${D}${sysconfdir}/dhcp
30 install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
31 install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
32 install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
33 install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
34
35 rm -f ${D}${sysconfdir}/dhclient.conf
36 rm -f ${D}${sysconfdir}/dhcpd.conf
37 install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
38 install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
39
40 install -d ${D}${base_sbindir}/
41 mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
42 install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
43}
44
45PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
46FILES_${PN} = ""
47FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
48FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
49
50FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
51RDEPENDS_dhcp-client = "bash"
52
53FILES_dhcp-omshell = "${bindir}/omshell"
54
55CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
56CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
57CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"