[PATCH] add interface and hosts parsing from uci dhcp config to ISC dhcpd (fix bridges)
[openwrt/svn-archive/archive.git] / net / dhcp / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=3
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 SUBMENU:=IP Addresses and Names
24 TITLE:=ISC's DHCP
25 URL:=https://www.isc.org/software/dhcp
26 endef
27
28 define Package/dhcp-relay
29 $(call Package/dhcp/Default)
30 TITLE+= relay
31 endef
32
33 define Package/dhcp-server
34 $(call Package/dhcp/Default)
35 TITLE+= server
36 endef
37
38
39 define Build/Configure
40 # it's not GNU autoconf stuff
41 (cd $(PKG_BUILD_DIR) ; \
42 UNAME_S=Linux \
43 UNAME_M=$(ARCH) \
44 UNAME_R=2.6.23 \
45 ./configure \
46 --copts "$(TARGET_CFLAGS)" \
47 );
48 endef
49
50 define Build/Compile
51 UNAME_S=Linux \
52 UNAME_M=$(ARCH) \
53 UNAME_R=2.6.23 \
54 $(MAKE) -C $(PKG_BUILD_DIR) \
55 $(TARGET_CONFIGURE_OPTS) \
56 DESTDIR="$(PKG_INSTALL_DIR)" \
57 all install
58 endef
59
60
61 define Package/dhcp-relay/install
62 $(INSTALL_DIR) $(1)/usr/sbin
63 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
64 endef
65
66 define Package/dhcp-server/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(INSTALL_DIR) $(1)/usr/local/lib
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
71 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin/
72 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/local/lib/*.a $(1)/usr/local/lib
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
75 endef
76
77 $(eval $(call BuildPackage,dhcp-relay))
78 $(eval $(call BuildPackage,dhcp-server))