diff options
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp4.inc')
-rw-r--r-- | meta/recipes-connectivity/dhcp/dhcp4.inc | 57 |
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 @@ | |||
1 | SECTION = "console/network" | ||
2 | DESCRIPTION = "Internet Software Consortium DHCP package" | ||
3 | HOMEPAGE = "http://www.isc.org/" | ||
4 | |||
5 | LICENSE = "ISC" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=bb6fd41f5895b67088ebea61ad365e74" | ||
7 | |||
8 | SRC_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 | |||
14 | inherit autotools | ||
15 | |||
16 | TARGET_CFLAGS += "-D_GNU_SOURCE" | ||
17 | EXTRA_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 | |||
22 | do_compile_prepend () { | ||
23 | cp -f ${WORKDIR}/site.h ${S}/includes | ||
24 | } | ||
25 | |||
26 | do_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 | |||
45 | PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell" | ||
46 | FILES_${PN} = "" | ||
47 | FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf" | ||
48 | FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay" | ||
49 | |||
50 | FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf" | ||
51 | RDEPENDS_dhcp-client = "bash" | ||
52 | |||
53 | FILES_dhcp-omshell = "${bindir}/omshell" | ||
54 | |||
55 | CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf" | ||
56 | CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay" | ||
57 | CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf" | ||