Use the newly added INSTALL_CONF variable
[openwrt/svn-archive/archive.git] / net / dhcp / 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
12 PKG_VERSION:=3.0.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
17 PKG_MD5SUM:=f91416a0b8ed3fd0601688cf0b7df58f
18 PKG_CAT:=zcat
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/Default
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=ISC's DHCP
29 URL:=http://www.isc.org/
30 endef
31
32 define Package/dhcp-relay
33 $(call Package/dhcp/Default)
34 TITLE+= relay
35 endef
36
37 define Package/dhcp-server
38 $(call Package/dhcp/Default)
39 TITLE+= server
40 endef
41
42
43 define Build/Configure
44 # it's not GNU autoconf stuff
45 (cd $(PKG_BUILD_DIR) ; \
46 ./configure \
47 --copts "$(TARGET_CFLAGS)" \
48 linux-2.2 \
49 );
50 endef
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 $(TARGET_CONFIGURE_OPTS) \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 all install
57 endef
58
59
60 define Package/dhcp-relay/install
61 $(INSTALL_DIR) $(1)/usr/sbin
62 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
63 endef
64
65 define Package/dhcp-server/install
66 $(INSTALL_DIR) $(1)/usr/sbin
67 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
68 endef
69
70 $(eval $(call BuildPackage,dhcp-relay))
71 $(eval $(call BuildPackage,dhcp-server))