add screen
[openwrt.git] / package / dhcp-forwarder / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := dhcp-forwarder
6 PKG_VERSION := 0.7
7 PKG_RELEASE := 4
8 PKG_MD5SUM := e7f876e615ebc3f96418f6477b4451e2
9
10 PKG_SOURCE_URL := \
11 http://savannah.nongnu.org/download/dhcp-fwd/ \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 PKG_CAT := bzcat
15
16 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 IPKG_DHCP_FORWARDER:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
20 IDIR_DHCP_FORWARDER:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
21 INFO_DHCP_FORWARDER:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
22
23 $(DL_DIR)/$(PKG_SOURCE):
24 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
25
26 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
27 rm -rf $(PKG_BUILD_DIR)
28 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
29 touch $(PKG_BUILD_DIR)/.prepared
30
31 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
32 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
33 $(TARGET_CONFIGURE_OPTS) \
34 CFLAGS="$(TARGET_CFLAGS)" \
35 ac_cv_func_malloc_0_nonnull="yes" \
36 ./configure \
37 --target=$(GNU_TARGET_NAME) \
38 --host=$(GNU_TARGET_NAME) \
39 --build=$(GNU_HOST_NAME) \
40 --program-prefix="" \
41 --program-suffix="" \
42 --prefix=/usr \
43 --exec-prefix=/usr \
44 --bindir=/usr/bin \
45 --datadir=/usr/share \
46 --includedir=/usr/include \
47 --infodir=/usr/share/info \
48 --libdir=/usr/lib \
49 --libexecdir=/usr/lib \
50 --localstatedir=/var \
51 --mandir=/usr/share/man \
52 --sbindir=/usr/sbin \
53 --sysconfdir=/etc \
54 $(DISABLE_LARGEFILE) \
55 $(DISABLE_NLS) \
56 )
57 touch $(PKG_BUILD_DIR)/.configured
58
59 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 cfg_filename="/etc/dhcp-fwd.conf"
62 touch $(PKG_BUILD_DIR)/.built
63
64 $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd: $(PKG_BUILD_DIR)/.built
65 mkdir -p $(PKG_INSTALL_DIR)
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 install
69
70 $(IPKG_DHCP_FORWARDER): $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd
71 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_DHCP_FORWARDER) ./ipkg/$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
72 install -m0644 ./ipkg/$(PKG_NAME).conffiles $(IDIR_DHCP_FORWARDER)/CONTROL/conffiles
73 install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc/init.d
74 install -m0755 ./ipkg/$(PKG_NAME).init $(IDIR_DHCP_FORWARDER)/etc/init.d/dhcp-fwd
75 install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc
76 install -m0644 $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(IDIR_DHCP_FORWARDER)/etc/
77 install -m0755 -d $(IDIR_DHCP_FORWARDER)/usr/bin
78 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(IDIR_DHCP_FORWARDER)/usr/bin/
79 $(RSTRIP) $(IDIR_DHCP_FORWARDER)
80 $(IPKG_BUILD) $(IDIR_DHCP_FORWARDER) $(PACKAGE_DIR)
81
82 $(INFO_DHCP_FORWARDER): $(IPKG_DHCP_FORWARDER)
83 $(IPKG) install $(IPKG_DHCP_FORWARDER)
84
85 source: $(DL_DIR)/$(PKG_SOURCE)
86 prepare: $(PKG_BUILD_DIR)/.prepared
87 compile: $(IPKG_DHCP_FORWARDER)
88 install: $(INFO_DHCP_FORWARDER)
89
90 clean:
91 rm -rf $(PKG_BUILD_DIR)
92 rm -rf $(IPKG_DHCP_FORWARDER)
This page took 0.039218 seconds and 5 git commands to generate.