681fddca5454b933c42e72ffc25d7ff6970a4329
[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.5
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:=ce5d30d4645e4eab1f54561b487d1ec7
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 UNAME_S=Linux \
47 UNAME_M=$(ARCH) \
48 UNAME_R=2.4.34 \
49 ./configure \
50 --copts "$(TARGET_CFLAGS)" \
51 linux-2.2 \
52 );
53 endef
54
55 define Build/Compile
56 UNAME_S=Linux \
57 UNAME_M=$(ARCH) \
58 UNAME_R=2.4.34 \
59 $(MAKE) -C $(PKG_BUILD_DIR) \
60 $(TARGET_CONFIGURE_OPTS) \
61 DESTDIR="$(PKG_INSTALL_DIR)" \
62 all install
63 endef
64
65
66 define Package/dhcp-relay/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
69 endef
70
71 define Package/dhcp-server/install
72 $(INSTALL_DIR) $(1)/usr/sbin
73 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
74 endef
75
76 $(eval $(call BuildPackage,dhcp-relay))
77 $(eval $(call BuildPackage,dhcp-server))