58b8f412801e30e11afd83afbdc35592f859972d
[openwrt/svn-archive/archive.git] / net / dhcp / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=dhcp
11 PKG_VERSION:=3.1.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/
16 PKG_MD5SUM:=27d179a3c3fbef576566b456a1168246
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/dhcp/Default
21 SECTION:=net
22 CATEGORY:=Network
23 TITLE:=ISC's DHCP
24 URL:=http://www.isc.org/
25 endef
26
27 define Package/dhcp-relay
28 $(call Package/dhcp/Default)
29 TITLE+= relay
30 endef
31
32 define Package/dhcp-server
33 $(call Package/dhcp/Default)
34 TITLE+= server
35 endef
36
37
38 define Build/Configure
39 # it's not GNU autoconf stuff
40 (cd $(PKG_BUILD_DIR) ; \
41 UNAME_S=Linux \
42 UNAME_M=$(ARCH) \
43 UNAME_R=2.6.23 \
44 ./configure \
45 --copts "$(TARGET_CFLAGS)" \
46 );
47 endef
48
49 define Build/Compile
50 UNAME_S=Linux \
51 UNAME_M=$(ARCH) \
52 UNAME_R=2.6.23 \
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 $(INSTALL_BIN) $(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 $(INSTALL_DIR) $(1)/usr/bin
68 $(INSTALL_DIR) $(1)/usr/local/lib
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin/
71 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/lib/*.a $(1)/usr/local/lib
72 $(INSTALL_DIR) $(1)/etc/init.d
73 $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
74 endef
75
76 $(eval $(call BuildPackage,dhcp-relay))
77 $(eval $(call BuildPackage,dhcp-server))