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
|
|
|
|
2020-04-25 23:28:30 +02:00
|
|
|
DHCP_VERSION = 4.4.2
|
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
|
2019-04-18 15:17:33 +02:00
|
|
|
DHCP_LICENSE = MPL-2.0
|
2013-01-22 04:35:48 +01:00
|
|
|
DHCP_LICENSE_FILES = LICENSE
|
2019-04-26 18:56:13 +02:00
|
|
|
DHCP_DEPENDENCIES = bind
|
2019-11-11 04:31:06 +01:00
|
|
|
|
|
|
|
# use libtool-enabled configure.ac
|
|
|
|
define DHCP_LIBTOOL_AUTORECONF
|
|
|
|
cp $(@D)/configure.ac+lt $(@D)/configure.ac
|
|
|
|
endef
|
|
|
|
|
2014-08-04 20:19:03 +02:00
|
|
|
DHCP_CONF_ENV = \
|
|
|
|
CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
|
2017-10-27 21:24:24 +02:00
|
|
|
-D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \
|
|
|
|
CFLAGS='$(TARGET_CFLAGS) -DISC_CHECK_NONE=1'
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
DHCP_CONF_OPTS = \
|
2019-04-26 18:56:13 +02:00
|
|
|
--with-libbind=$(STAGING_DIR)/usr \
|
2016-10-11 13:20:17 +02:00
|
|
|
--with-randomdev=/dev/random \
|
2010-07-16 11:18:07 +02:00
|
|
|
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
2014-08-04 20:19:04 +02:00
|
|
|
--with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \
|
2010-07-16 11:18:07 +02:00
|
|
|
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
2014-08-04 20:19:04 +02:00
|
|
|
--with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \
|
2010-07-16 11:18:07 +02:00
|
|
|
--with-srv-pid-file=/var/run/dhcpd.pid \
|
2014-08-04 20:19:04 +02:00
|
|
|
--with-srv6-pid-file=/var/run/dhcpd6.pid \
|
2010-07-16 11:18:07 +02:00
|
|
|
--with-cli-pid-file=/var/run/dhclient.pid \
|
2014-08-04 20:19:04 +02:00
|
|
|
--with-cli6-pid-file=/var/run/dhclient6.pid \
|
|
|
|
--with-relay-pid-file=/var/run/dhcrelay.pid \
|
|
|
|
--with-relay6-pid-file=/var/run/dhcrelay6.pid
|
2011-04-25 15:13:58 +02:00
|
|
|
|
2019-04-26 18:56:13 +02:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
DHCP_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/bind9-config --libs bind9`"
|
|
|
|
DHCP_CONF_OPTS += --disable-libtool
|
2019-04-18 15:17:33 +02:00
|
|
|
else
|
2019-11-11 04:31:06 +01:00
|
|
|
DHCP_POST_EXTRACT_HOOKS += DHCP_LIBTOOL_AUTORECONF
|
|
|
|
DHCP_AUTORECONF = YES
|
2019-04-26 18:56:13 +02:00
|
|
|
DHCP_CONF_OPTS += --enable-libtool
|
2019-04-18 15:17:33 +02:00
|
|
|
endif
|
|
|
|
|
2019-04-26 18:56:13 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y)
|
|
|
|
DHCP_CONF_OPTS += --enable-delayed-ack
|
2019-04-18 15:17:33 +02:00
|
|
|
endif
|
|
|
|
|
2019-08-09 04:27:59 +02:00
|
|
|
define DHCP_INSTALL_LIBS
|
|
|
|
$(MAKE) -C $(@D)/common install-exec DESTDIR=$(TARGET_DIR)
|
|
|
|
$(MAKE) -C $(@D)/omapip install-exec DESTDIR=$(TARGET_DIR)
|
|
|
|
endef
|
|
|
|
|
2010-07-16 11:18:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
|
2019-08-09 04:27:59 +02:00
|
|
|
define DHCP_INSTALL_CTL_LIBS
|
|
|
|
$(MAKE) -C $(@D)/dhcpctl install-exec DESTDIR=$(TARGET_DIR)
|
|
|
|
endef
|
2010-07-16 11:18:07 +02:00
|
|
|
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)
|
2019-08-09 14:05:44 +02:00
|
|
|
$(MAKE) -C $(@D)/server DESTDIR=$(TARGET_DIR) install-sbinPROGRAMS
|
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)
|
2019-08-09 14:05:44 +02:00
|
|
|
$(MAKE) -C $(@D)/relay DESTDIR=$(TARGET_DIR) install-sbinPROGRAMS
|
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)
|
2019-08-09 14:05:44 +02:00
|
|
|
$(MAKE) -C $(@D)/client DESTDIR=$(TARGET_DIR) sbindir=/sbin \
|
|
|
|
install-sbinPROGRAMS
|
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
|
|
|
|
|
2014-12-01 15:18:16 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
|
2014-09-15 23:04:43 +02:00
|
|
|
define DHCP_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/dhcp/dhcpd.service \
|
2015-03-20 20:14:04 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/dhcpd.service
|
2014-09-15 23:04:43 +02:00
|
|
|
|
2017-05-27 00:13:47 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
|
2014-09-15 23:04:43 +02:00
|
|
|
echo "d /var/lib/dhcp 0755 - - - -" > \
|
|
|
|
$(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf
|
|
|
|
echo "f /var/lib/dhcp/dhcpd.leases - - - - -" >> \
|
|
|
|
$(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf
|
|
|
|
endef
|
2014-12-01 15:18:16 +01:00
|
|
|
endif
|
2014-09-15 23:04:43 +02:00
|
|
|
|
2010-07-16 11:18:07 +02:00
|
|
|
define DHCP_INSTALL_TARGET_CMDS
|
2019-08-09 04:27:59 +02:00
|
|
|
$(DHCP_INSTALL_LIBS)
|
|
|
|
$(DHCP_INSTALL_CTL_LIBS)
|
2010-07-16 11:18:07 +02:00
|
|
|
$(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))
|