2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-02-16 20:08:33 +01:00
|
|
|
#
|
|
|
|
# dhcp
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-11-09 12:30:59 +01:00
|
|
|
|
2014-06-11 12:39:39 +02:00
|
|
|
DHCP_VERSION = 4.1-ESV-R9
|
2013-01-22 04:35:48 +01:00
|
|
|
DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION)
|
2013-07-24 12:34:32 +02:00
|
|
|
DHCP_INSTALL_STAGING = YES
|
2013-01-22 04:35:48 +01:00
|
|
|
DHCP_LICENSE = ISC
|
|
|
|
DHCP_LICENSE_FILES = LICENSE
|
2010-07-16 11:18:07 +02:00
|
|
|
DHCP_CONF_ENV = ac_cv_file__dev_random=yes
|
|
|
|
DHCP_CONF_OPT = \
|
|
|
|
--localstatedir=/var/lib/dhcp \
|
|
|
|
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
|
|
|
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
|
|
|
--with-srv-pid-file=/var/run/dhcpd.pid \
|
|
|
|
--with-cli-pid-file=/var/run/dhclient.pid \
|
2011-04-25 15:13:58 +02:00
|
|
|
--with-relay-pid-file=/var/run/dhcrelay.pid
|
|
|
|
|
2013-07-19 14:46:37 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
|
|
|
|
DHCP_CONF_OPT += --enable-delayed-ack
|
|
|
|
endif
|
|
|
|
|
2011-04-25 15:13:58 +02:00
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
|
|
|
DHCP_CONF_OPT += --disable-dhcpv6
|
|
|
|
endif
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2010-07-16 11:18:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
|
|
|
|
define DHCP_INSTALL_SERVER
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib
|
2010-07-16 11:18:07 +02:00
|
|
|
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
|
|
|
|
$(INSTALL) -m 0755 -D $(@D)/server/dhcpd $(TARGET_DIR)/usr/sbin/dhcpd
|
2011-02-01 14:25:05 +01:00
|
|
|
$(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \
|
|
|
|
$(TARGET_DIR)/etc/dhcp/dhcpd.conf
|
2010-07-16 11:18:07 +02:00
|
|
|
endef
|
|
|
|
endif
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2010-07-16 11:18:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_RELAY),y)
|
|
|
|
define DHCP_INSTALL_RELAY
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib
|
2005-04-15 04:19:11 +02:00
|
|
|
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
|
2011-02-01 14:25:05 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(DHCP_DIR)/relay/dhcrelay \
|
|
|
|
$(TARGET_DIR)/usr/sbin/dhcrelay
|
2010-07-16 11:18:07 +02:00
|
|
|
endef
|
|
|
|
endif
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2010-07-16 11:18:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y)
|
|
|
|
define DHCP_INSTALL_CLIENT
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib
|
2005-04-15 04:19:11 +02:00
|
|
|
(cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp)
|
2011-02-01 14:25:05 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(DHCP_DIR)/client/dhclient \
|
|
|
|
$(TARGET_DIR)/usr/sbin/dhclient
|
2007-09-17 14:30:31 +02:00
|
|
|
$(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \
|
|
|
|
$(TARGET_DIR)/etc/dhcp/dhclient.conf
|
|
|
|
$(INSTALL) -m 0755 -D package/dhcp/dhclient-script \
|
|
|
|
$(TARGET_DIR)/sbin/dhclient-script
|
2010-07-16 11:18:07 +02:00
|
|
|
endef
|
|
|
|
endif
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2014-06-11 12:39:39 +02:00
|
|
|
# Options don't matter, scripts won't start if binaries aren't there
|
|
|
|
define DHCP_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S80dhcp-server
|
|
|
|
$(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S80dhcp-relay
|
|
|
|
endef
|
|
|
|
|
2010-07-16 11:18:07 +02:00
|
|
|
define DHCP_INSTALL_TARGET_CMDS
|
|
|
|
$(DHCP_INSTALL_RELAY)
|
|
|
|
$(DHCP_INSTALL_SERVER)
|
|
|
|
$(DHCP_INSTALL_CLIENT)
|
|
|
|
endef
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|