bump version to 2.8
[openwrt.git] / obsolete-buildroot / make / dhcp_relay.mk
1 #############################################################
2 #
3 # dhcp_relay
4 #
5 #############################################################
6 DHCP_RELAY_SOURCE:=dhcp-3.0pl2.tar.gz
7 DHCP_RELAY_SITE:=ftp://ftp.isc.org/isc/dhcp
8 DHCP_RELAY_CAT:=zcat
9 DHCP_RELAY_DIR:=$(BUILD_DIR)/dhcp-3.0pl2
10 DHCP_RELAY_BINARY:=work.linux-2.2/relay/dhcrelay
11 DHCP_RELAY_TARGET_BINARY:=usr/sbin/dhcrelay
12 BVARS=PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
13 -D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\"' \
14 VARDB=/var/lib/dhcp
15
16 $(DL_DIR)/$(DHCP_RELAY_SOURCE):
17 $(WGET) -P $(DL_DIR) $(DHCP_RELAY_SITE)/$(DHCP_RELAY_SOURCE)
18
19 dhcp_relay-source: $(DL_DIR)/$(DHCP_RELAY_SOURCE)
20
21 $(DHCP_RELAY_DIR)/.unpacked: $(DL_DIR)/$(DHCP_RELAY_SOURCE)
22 $(DHCP_RELAY_CAT) $(DL_DIR)/$(DHCP_RELAY_SOURCE) | tar -C $(BUILD_DIR) -xvf -
23 touch $(DHCP_RELAY_DIR)/.unpacked
24
25 $(DHCP_RELAY_DIR)/.configured: $(DHCP_RELAY_DIR)/.unpacked
26 (cd $(DHCP_RELAY_DIR); $(TARGET_CONFIGURE_OPTS) ./configure );
27 touch $(DHCP_RELAY_DIR)/.configured
28
29 $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_RELAY_DIR)/.configured
30 $(MAKE) CC=$(TARGET_CC) $(BVARS) -C $(DHCP_RELAY_DIR)
31 $(STRIP) $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY)
32
33 $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY)
34 (cd $(TARGET_DIR)/var/lib; ln -sf /tmp dhcp)
35 cp -a $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY) $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
36 rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
37 $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
38
39 dhcp_relay: uclibc $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
40
41 dhcp_relay-clean:
42 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DHCP_RELAY_DIR) uninstall
43 -$(MAKE) -C $(DHCP_RELAY_DIR) clean
44
45 dhcp_relay-dirclean:
46 rm -rf $(DHCP_RELAY_DIR)
47
This page took 0.041739 seconds and 5 git commands to generate.