2005-02-16 20:08:33 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# dhcp
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
DHCP_VERSION:=3.0.5
|
|
|
|
DHCP_SOURCE:=dhcp-$(DHCP_VERSION).tar.gz
|
2007-09-17 14:30:31 +02:00
|
|
|
DHCP_SITE:=ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history
|
2006-10-01 17:17:52 +02:00
|
|
|
DHCP_CAT:=$(ZCAT)
|
2007-07-11 16:06:06 +02:00
|
|
|
DHCP_DIR:=$(BUILD_DIR)/dhcp-$(DHCP_VERSION)
|
2005-03-09 18:45:21 +01:00
|
|
|
DHCP_SERVER_BINARY:=work.linux-2.2/server/dhcpd
|
2005-02-16 20:08:33 +01:00
|
|
|
DHCP_RELAY_BINARY:=work.linux-2.2/relay/dhcrelay
|
2005-03-09 18:45:21 +01:00
|
|
|
DHCP_CLIENT_BINARY:=work.linux-2.2/client/dhclient
|
2005-02-16 20:08:33 +01:00
|
|
|
DHCP_SERVER_TARGET_BINARY:=usr/sbin/dhcpd
|
|
|
|
DHCP_RELAY_TARGET_BINARY:=usr/sbin/dhcrelay
|
|
|
|
DHCP_CLIENT_TARGET_BINARY:=usr/sbin/dhclient
|
|
|
|
BVARS=PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
|
|
|
|
-D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\"' \
|
|
|
|
VARDB=/var/lib/dhcp
|
|
|
|
|
2005-02-24 20:36:18 +01:00
|
|
|
$(DL_DIR)/$(DHCP_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(DHCP_SITE),$(DHCP_SOURCE))
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2005-02-24 20:36:18 +01:00
|
|
|
dhcp-source: $(DL_DIR)/$(DHCP_SOURCE)
|
2005-02-16 20:08:33 +01:00
|
|
|
|
2007-02-16 14:01:06 +01:00
|
|
|
dhcp_server-source: dhcp-source
|
|
|
|
dhcp_relay-source: dhcp-source
|
|
|
|
dhcp_client-source: dhcp-source
|
|
|
|
|
2005-02-24 20:36:18 +01:00
|
|
|
$(DHCP_DIR)/.unpacked: $(DL_DIR)/$(DHCP_SOURCE)
|
|
|
|
$(DHCP_CAT) $(DL_DIR)/$(DHCP_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-06-24 10:36:13 +02:00
|
|
|
toolchain/patch-kernel.sh $(DHCP_DIR) package/dhcp/ dhcp\*.patch
|
2007-09-17 14:30:31 +02:00
|
|
|
touch $@
|
2005-02-16 20:08:33 +01:00
|
|
|
|
|
|
|
$(DHCP_DIR)/.configured: $(DHCP_DIR)/.unpacked
|
2007-06-27 14:01:27 +02:00
|
|
|
(cd $(DHCP_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-09-17 14:30:31 +02:00
|
|
|
./configure; \
|
|
|
|
)
|
|
|
|
touch $@
|
2005-02-16 20:08:33 +01:00
|
|
|
|
|
|
|
$(DHCP_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_DIR)/.configured
|
2005-02-16 20:48:03 +01:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) $(BVARS) -C $(DHCP_DIR)
|
2007-10-01 18:15:31 +02:00
|
|
|
$(STRIPCMD) $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
|
2005-02-16 20:08:33 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/var/lib
|
2007-09-17 14:30:31 +02:00
|
|
|
(cd $(TARGET_DIR)/var/lib; \
|
|
|
|
ln -snf /tmp dhcp; \
|
|
|
|
)
|
|
|
|
$(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_SERVER_BINARY) \
|
|
|
|
$(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY)
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/init.d
|
2007-09-17 14:30:31 +02:00
|
|
|
$(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server \
|
|
|
|
$(TARGET_DIR)/etc/init.d
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/dhcp
|
2007-09-17 14:30:31 +02:00
|
|
|
$(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \
|
|
|
|
$(TARGET_DIR)/etc/dhcp/dhcpd.conf
|
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/info
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/man
|
|
|
|
endif
|
|
|
|
rm -rf $(TARGET_DIR)/share/locale
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc
|
2005-02-16 20:08:33 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
|
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)
|
2007-09-17 14:30:31 +02:00
|
|
|
$(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_RELAY_BINARY) \
|
|
|
|
$(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/init.d
|
2007-09-17 14:30:31 +02:00
|
|
|
$(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay \
|
|
|
|
$(TARGET_DIR)/etc/init.d
|
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/info
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/man
|
|
|
|
endif
|
|
|
|
# Why on earth do we wipe out whole directories here?
|
|
|
|
#rm -rf $(TARGET_DIR)/usr/share/locale
|
|
|
|
#rm -rf $(TARGET_DIR)/usr/share/doc
|
2005-02-16 20:08:33 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(DHCP_CLIENT_TARGET_BINARY): $(DHCP_DIR)/$(DHCP_RELAY_BINARY)
|
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)
|
2007-09-17 14:30:31 +02:00
|
|
|
$(INSTALL) -m 0755 -D $(DHCP_DIR)/$(DHCP_CLIENT_BINARY) \
|
|
|
|
$(TARGET_DIR)/$(DHCP_CLIENT_TARGET_BINARY)
|
2007-08-20 07:03:21 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/dhcp
|
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
|
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/info
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/man
|
|
|
|
endif
|
|
|
|
# Why on earth do we wipe out whole directories here?
|
|
|
|
#rm -rf $(TARGET_DIR)/usr/share/locale
|
|
|
|
#rm -rf $(TARGET_DIR)/usr/share/doc
|
2005-02-16 20:08:33 +01:00
|
|
|
|
|
|
|
dhcp_server: uclibc $(TARGET_DIR)/$(DHCP_SERVER_TARGET_BINARY)
|
|
|
|
|
|
|
|
dhcp_relay: uclibc $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
|
|
|
|
|
|
|
|
dhcp_client: uclibc $(TARGET_DIR)/$(DHCP_CLIENT_TARGET_BINARY)
|
|
|
|
|
|
|
|
dhcp-clean:
|
|
|
|
-$(MAKE) -C $(DHCP_DIR) clean
|
|
|
|
|
|
|
|
dhcp-dirclean:
|
|
|
|
rm -rf $(DHCP_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
#ifeq ($(BR2_PACKAGE_ISC_DHCP),y)
|
2005-03-09 18:45:21 +01:00
|
|
|
#TARGETS+=dhcp
|
|
|
|
#endif
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_SERVER),y)
|
2005-03-09 18:45:21 +01:00
|
|
|
TARGETS+=dhcp_server
|
2005-02-16 20:08:33 +01:00
|
|
|
endif
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_RELAY),y)
|
2005-02-16 20:08:33 +01:00
|
|
|
TARGETS+=dhcp_relay
|
|
|
|
endif
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y)
|
2005-03-09 18:45:21 +01:00
|
|
|
TARGETS+=dhcp_client
|
2005-02-16 20:08:33 +01:00
|
|
|
endif
|