[package] usbip: update userspace to match kernel part
[openwrt/svn-archive/archive.git] / net / dhcp / Makefile
1 #
2 # Copyright (C) 2006-2012 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:=4.2.4
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION)
16 PKG_MD5SUM:=c244cefe663d43100af757d8ff625a1f
17
18 PKG_FIXUP:=autoreconf
19 PKG_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/dhcp/Default
24 SECTION:=net
25 CATEGORY:=Network
26 SUBMENU:=IP Addresses and Names
27 TITLE:=ISC's DHCP
28 URL:=https://www.isc.org/software/dhcp
29 endef
30
31 define Package/dhcp-relay
32 $(call Package/dhcp/Default)
33 TITLE+= relay
34 endef
35
36 define Package/dhcp-relay/description
37 provides a means for relaying DHCP and BOOTP requests from a subnet to which
38 no DHCP server is directly connected to one or more DHCP servers on other
39 subnets.
40 endef
41
42 define Package/dhcp-client
43 $(call Package/dhcp/Default)
44 TITLE+= client
45 endef
46
47 define Package/dhcp-client/description
48 provides a means for configuring one or more network interfaces using the
49 Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols
50 fail, by statically assigning an address.
51 endef
52
53 define Package/dhcp-server
54 $(call Package/dhcp/Default)
55 TITLE+= server
56 endef
57
58 define Package/dhcp-server/description
59 implements the Dynamic Host Configuration Protocol (DHCP) and the Internet
60 Bootstrap Protocol (BOOTP).
61 endef
62
63 define Package/dhcp-omshell
64 $(call Package/dhcp/Default)
65 DEPENDS:= +dhcp-server
66 TITLE+= omshell
67 endef
68
69 define Package/dhcp-omshell/description
70 provides an interactive way to connect to, query, and possibly change, the ISC
71 DHCP Server's state via OMAPI, the Object Management API.
72 endef
73
74 CONFIGURE_ARGS += \
75 --disable-tracing \
76 --enable-paranoia \
77 --disable-dependency-tracking \
78 ac_cv_file__dev_random=yes
79
80 ifeq ($(CONFIG_DHCP4_ENABLE_IPV6),y)
81 CONFIGURE_ARGS += --enable-dhcpv6
82 else
83 CONFIGURE_ARGS += --disable-dhcpv6
84 endif
85
86 define Build/Compile
87 $(MAKE) -C $(PKG_BUILD_DIR) \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
89 BUILD_CC="$(HOSTCC_NOCACHE)" \
90 host_alias="$(GNU_TARGET_NAME)" \
91 target_alias="$(GNU_TARGET_NAME)" \
92 build_alias="$(GNU_HOST_NAME)" \
93 ac_cv_file__dev_random=yes \
94 all install-exec
95 endef
96
97 define Package/dhcp-relay/install
98 $(INSTALL_DIR) $(1)/usr/sbin
99 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin/
100 endef
101
102 define Package/dhcp-server/install
103 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
104 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin/
105 $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
106 $(INSTALL_BIN) ./files/dhcpd.conf $(1)/etc
107 ifeq ($(CONFIG_DHCP4_ENABLE_IPV6),y)
108 $(INSTALL_BIN) ./files/dhcpd6.init $(1)/etc/init.d/dhcpd6
109 $(INSTALL_BIN) ./files/dhcpd6.conf $(1)/etc
110 endif
111 endef
112
113 define Package/dhcp-client/install
114 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
115 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhclient $(1)/usr/sbin/
116 $(INSTALL_BIN) ./files/dhclient-script $(1)/usr/sbin/
117 $(INSTALL_BIN) ./files/dhclient.init $(1)/etc/init.d/dhclient
118 ifeq ($(CONFIG_DHCP4_ENABLE_IPV6),y)
119 $(INSTALL_BIN) ./files/dhclient6.init $(1)/etc/init.d/dhclient6
120 $(INSTALL_BIN) ./files/dhclient6.conf $(1)/etc
121 endif
122 endef
123
124 define Package/dhcp-omshell/install
125 $(INSTALL_DIR) $(1)/usr/bin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin/
127 endef
128
129 $(eval $(call BuildPackage,dhcp-relay))
130 $(eval $(call BuildPackage,dhcp-server))
131 $(eval $(call BuildPackage,dhcp-client))
132 $(eval $(call BuildPackage,dhcp-omshell))