add zlib for dropbear
[openwrt.git] / obsolete-buildroot / make / dhcp-fwd.mk
1 ## dhcp-fwd
2
3 DHCP_FWD_VERSION := 0.7
4 DHCP_FWD_RELEASE := 1
5
6 DHCP_FWD_SOURCE := dhcp-forwarder-$(DHCP_FWD_VERSION).tar.bz2
7 DHCP_FWD_SITE := http://www-user.tu-chemnitz.de/~ensc/dhcp-fwd/files/
8 DHCP_FWD_DIR := $(BUILD_DIR)/dhcp-forwarder-$(DHCP_FWD_VERSION)
9 DHCP_FWD_CAT := bzcat
10
11 DHCP_FWD_BUILD_DIR := $(BUILD_DIR)/dhcp-fwd_$(DHCP_FWD_VERSION)-$(DHCP_FWD_RELEASE)
12 DHCP_FWD_IPK_DIR := $(OPENWRT_IPK_DIR)/dhcp-fwd
13 DHCP_FWD_IPK := $(DHCP_FWD_BUILD_DIR)_$(ARCH).ipk
14
15
16 $(DL_DIR)/$(DHCP_FWD_SOURCE):
17 $(WGET) -P $(DL_DIR) $(DHCP_FWD_SITE)/$(DHCP_FWD_SOURCE)
18
19
20 $(DHCP_FWD_DIR)/.stamp-unpacked: $(DL_DIR)/$(DHCP_FWD_SOURCE)
21 $(DHCP_FWD_CAT) $(DL_DIR)/$(DHCP_FWD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
22
23 touch $(DHCP_FWD_DIR)/.stamp-unpacked
24
25
26 $(DHCP_FWD_DIR)/.stamp-configured: $(DHCP_FWD_DIR)/.stamp-unpacked
27 cd $(DHCP_FWD_DIR) ; \
28 rm -rf config.cache ; \
29 $(TARGET_CONFIGURE_OPTS) \
30 CFLAGS="$(TARGET_CFLAGS)" \
31 ac_cv_func_malloc_0_nonnull="yes" \
32 ./configure \
33 --target=$(GNU_TARGET_NAME) \
34 --host=$(GNU_TARGET_NAME) \
35 --build=$(GNU_HOST_NAME) \
36 --prefix=/usr \
37 --exec-prefix=/usr \
38 --bindir=/usr/bin \
39 --sbindir=/usr/sbin \
40 --libexecdir=/usr/lib \
41 --datadir=/usr/share \
42 --infodir=/usr/share/info \
43 --mandir=/usr/share/man \
44 --localstatedir=/var \
45 --sysconfdir=/etc \
46 $(DISABLE_NLS) \
47
48 touch $(DHCP_FWD_DIR)/.stamp-configured
49
50
51 $(DHCP_FWD_DIR)/.stamp-built: $(DHCP_FWD_DIR)/.stamp-configured
52 cd $(DHCP_FWD_DIR) ; \
53 touch config.guess ; \
54 touch config.sub ; \
55 $(MAKE) \
56 CC=$(TARGET_CC) \
57 cfg_filename="/etc/dhcp-fwd.conf" \
58 all \
59
60 touch $(DHCP_FWD_DIR)/.stamp-built
61
62
63 $(DHCP_FWD_BUILD_DIR)/CONTROL/control: $(DHCP_FWD_DIR)/.stamp-built
64 rm -rf $(DHCP_FWD_BUILD_DIR)
65 mkdir -p $(DHCP_FWD_BUILD_DIR)/usr/sbin
66 cp -a $(DHCP_FWD_DIR)/dhcp-fwd $(DHCP_FWD_BUILD_DIR)/usr/sbin/
67 $(STRIP) $(DHCP_FWD_BUILD_DIR)/usr/sbin/*
68 cp -a $(DHCP_FWD_IPK_DIR)/root/* $(DHCP_FWD_BUILD_DIR)/
69 chmod 0755 $(DHCP_FWD_BUILD_DIR)/etc
70 chmod 0755 $(DHCP_FWD_BUILD_DIR)/etc/init.d
71 chmod 0755 $(DHCP_FWD_BUILD_DIR)/etc/init.d/*
72 chmod 0644 $(DHCP_FWD_BUILD_DIR)/etc/dhcp-fwd.conf
73 chmod 0755 $(DHCP_FWD_BUILD_DIR)/usr
74 chmod 0755 $(DHCP_FWD_BUILD_DIR)/usr/sbin
75 chmod 0755 $(DHCP_FWD_BUILD_DIR)/usr/sbin/*
76 cp -a $(DHCP_FWD_IPK_DIR)/CONTROL $(DHCP_FWD_BUILD_DIR)/
77 perl -pi -e "s/^Vers.*:.*$$/Version: $(DHCP_FWD_VERSION)-$(DHCP_FWD_RELEASE)/" $(DHCP_FWD_BUILD_DIR)/CONTROL/control
78 perl -pi -e "s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(DHCP_FWD_BUILD_DIR)/CONTROL/control
79
80 touch $(DHCP_FWD_BUILD_DIR)/CONTROL/control
81
82
83 $(DHCP_FWD_IPK): $(DHCP_FWD_BUILD_DIR)/CONTROL/control
84 cd $(BUILD_DIR); $(IPKG_BUILD) $(DHCP_FWD_BUILD_DIR)
85
86
87 dhcp-fwd-ipk: ipkg-utils $(DHCP_FWD_IPK)
88
89 dhcp-fwd-clean:
90 rm -rf $(DHCP_FWD_IPK)
91 rm -rf $(DHCP_FWD_BUILD_DIR)
92 rm -rf $(DHCP_FWD_DIR)
This page took 0.046877 seconds and 5 git commands to generate.