Port dhcp-forwarder to -ng
[openwrt/svn-archive/archive.git] / net / dhcp-forwarder / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=dhcp-forwarder
12 PKG_VERSION:=0.7
13 PKG_RELEASE:=4
14 PKG_MD5SUM:=e7f876e615ebc3f96418f6477b4451e2
15
16 PKG_SOURCE_URL:=http://savannah.nongnu.org/download/dhcp-fwd
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/dhcp-forwarder
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=DHCP relay agent
29 DESCRIPTION:=DHCP relay agent
30 URL:=http://www.nongnu.org/dhcp-fwd/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default,,ac_cv_func_malloc_0_nonnull="yes")
35 endef
36
37 define Build/Compile
38 rm -rf $(PKG_INSTALL_DIR)
39 mkdir -p $(PKG_INSTALL_DIR)
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 cfg_filename="/etc/dhcp-fwd.conf" \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Package/dhcp-forwarder/install
47 install -m0755 -d $(1)/etc
48 install -m0644 $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(1)/etc/
49 install -m0755 -d $(1)/etc/init.d
50 install -m0755 ./files/dhcp-fwd.init $(1)/etc/init.d/dhcp-fwd
51 install -m0755 -d $(1)/usr/bin
52 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(1)/usr/bin/
53 endef
54
55 $(eval $(call BuildPackage,dhcp-forwarder))