netbase: fix non working wpa_supplicant detection in network restarts. Push PR.
[openembedded.git] / recipes / dhcp / dhcp3.inc
1 SECTION = "console/network"
2 DESCRIPTION = "Internet Software Consortium DHCP package"
3 HOMEPAGE = "http://www.isc.org/"
4 LICENSE = "BSD"
5 INC_PR = "r11"
6
7 SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-3.1-history/dhcp-${PV}.tar.gz \
8            file://fixincludes.patch;patch=1 \
9            file://useless-use-of-bash.patch;patch=1 \
10            file://dhclient-script-exit-status.dpatch;patch=1 \
11            file://dhcp-3.0.3-dhclient-dbus.patch;patch=1;pnum=0 \
12            file://init-relay file://default-relay \
13            file://init-server file://default-server \
14            file://dhclient.conf file://dhcpd.conf"
15
16
17 inherit update-rc.d
18
19 INITSCRIPT_PACKAGES = "dhcp-server"
20 INITSCRIPT_NAME_dhcp-server = dhcp-server
21 INITSCRIPT_PARAMS_dhcp-server = "start 30 2 3 4 5 . stop 30 0 1 6 ."
22
23 TARGET_CC_ARCH += "${LDFLAGS}"
24
25 do_configure() {
26         ./configure
27 }
28
29 do_compile() {
30         make RANLIB=${RANLIB} PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
31         -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\" \
32         -D_PATH_DHCLIENT_SCRIPT=\"/sbin/dhclient-script\" \
33         -D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
34         -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
35 }
36
37 do_install() {
38         make -e DESTDIR=${D} USRMANDIR=${mandir}/man1 ADMMANDIR=${mandir}/man8 FFMANDIR=${mandir}/man5 LIBMANDIR=${mandir}/man3 LIBDIR=${libdir} INCDIR=${includedir} install
39         install -d ${D}${sysconfdir}/init.d
40         install -d ${D}${sysconfdir}/default
41         install -d ${D}${sysconfdir}/dhcp
42         install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
43         install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
44         install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
45         install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
46         install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
47         install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
48         install -d ${D}/var/lib/dhcp3
49 }
50
51 PACKAGES += "dhcp-server dhcp-client dhcp-relay dhcp-omshell"
52 FILES_${PN} = ""
53 FILES_dhcp-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server ${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
54 FILES_dhcp-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
55
56 FILES_dhcp-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf /var/lib/dhcp3"
57
58 FILES_dhcp-omshell = "${bindir}/omshell"
59
60 CONFFILES_dhcp-server_nylon = "/etc/dhcp/dhcpd.conf"
61 CONFFILES_dhcp-relay_nylon = "/etc/default/dhcp-relay"
62 CONFFILES_dhcp-client_nylon = "/etc/dhcp/dhclient.conf"