diff options
author | Qing He <qing.he@intel.com> | 2010-07-14 22:09:26 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-23 23:53:30 +0100 |
commit | 95bb97aeb652bfe9fdd775ebda6036dc9d6770f0 (patch) | |
tree | 173a18250ca42b9d4614d531fb9bf5794f2b7c6f /meta/packages/dhcp/dhcp4.inc | |
parent | 00a42b73b62b602f96afe23b015c6e07098b9926 (diff) | |
download | poky-95bb97aeb652bfe9fdd775ebda6036dc9d6770f0.tar.gz |
dhcp: upgrade to 4.1.1-P1
from version 4.1.0
changes:
original .bb file is based on dhcp3, whose build system differs from
dhcp 4.x, add a new dhcp4.inc and preserve dhcp3.inc for reference,
this should fix the conf file location bug of dhclient/dhcpd 4.1.0
- defining _PATH_DHC{LIENT,PD}_CONF in make parameter no longer works,
put these definition to includes/site.h
- delete upstream version of conf files, which are not used, and
with an installation path hardcoded to ${sysconfdir}
- similar thing happen for leases file, use new configure option to
specify
- RANLIB, LIBDIR, etc. as make parameter are no longer necessary
Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta/packages/dhcp/dhcp4.inc')
-rw-r--r-- | meta/packages/dhcp/dhcp4.inc | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/packages/dhcp/dhcp4.inc b/meta/packages/dhcp/dhcp4.inc new file mode 100644 index 0000000000..7652b948f0 --- /dev/null +++ b/meta/packages/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" | ||