2 # Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
3 # Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
13 PKG_RELEASE
:=$(AUTORELEASE
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=https
://ftp.isc.org
/isc
/kea
/$(PKG_VERSION
)
17 PKG_HASH
:=d642907374d17480ebe4df805b363dc9e230a955475a9f3e04a076b52d5c43ec
19 PKG_MAINTAINER
:=BangLang Huang
<banglang.huang@foxmail.com
>, Rosy Song
<rosysong@rosinson.com
>
21 PKG_LICENSE_FILES
:=COPYING
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/kea
/Default
33 SUBMENU
:=IP Addresses and Names
35 URL
:=https
://www.isc.org
/kea
38 define Package
/kea
/conffiles
42 Package
/kea-ctrl
/conffiles
= $(Package
/kea
/conffiles
)
43 Package
/kea-dhcp4
/conffiles
= $(Package
/kea
/conffiles
)
44 Package
/kea-dhcp6
/conffiles
= $(Package
/kea
/conffiles
)
45 Package
/kea-dhcp-ddns
/conffiles
= $(Package
/kea
/conffiles
)
47 ###### *************************************************************************
49 $(call Package
/kea
/Default
)
52 # shown in LuCI package description
53 define Package
/kea
/description
54 Kea is an open source DHCPv4
/DHCPv6 server being developed by Internet
55 Systems Consortium. Kea is a high-performance
, extensible DHCP server
56 engine that is designed to be easily modified and extended with hooks
57 libraries. It provides DHCPv4 and DHCPv6 servers
, a dynamic DNS update
58 module
, a portable DHCP library
, libdhcp
++, control agent that provides
59 management REST interface
, and a DHCP benchmarking tool
, perfdhcp.
62 ###### *************************************************************************
63 define Package
/kea-libs
64 $(call Package
/kea
/Default
)
66 DEPENDS
:=+libopenssl
+log4cplus \
69 define Package
/kea-libs
/description
70 Kea required Libraries.
73 ###### *************************************************************************
74 define Package
/kea-ctrl
75 $(call Package
/kea
/Default
)
77 DEPENDS
:=+procps-ng
+procps-ng-ps
+kea-dhcp4 \
78 +IPV6
:kea-dhcp6
+kea-dhcp-ddns
80 define Package
/kea-ctrl
/description
81 Tool to start
, stop
, reconfigure
, and report status for the Kea servers.
84 ###### *************************************************************************
85 define Package
/kea-dhcp4
86 $(call Package
/kea
/Default
)
90 define Package
/kea-dhcp4
/description
91 The DHCPv4 server process. This process responds to DHCPv4 queries from clients.
94 ###### *************************************************************************
95 define Package
/kea-dhcp6
96 $(call Package
/kea
/Default
)
98 DEPENDS
:=@IPV6
+kea-libs
100 define Package
/kea-dhcp6
/description
101 The DHCPv6 server process. This process responds to DHCPv6 queries from clients.
104 ###### *************************************************************************
105 define Package
/kea-dhcp-ddns
106 $(call Package
/kea
/Default
)
107 TITLE
+=DHCP Dynamic DNS
110 define Package
/kea-dhcp-ddns
/description
111 The DHCP Dynamic DNS process. This process acts
as an intermediary between
112 the DHCP servers and DNS servers. It receives name update requests from the
113 DHCP servers and sends DNS Update messages to the DNS servers.
116 ###### *************************************************************************
117 define Package
/kea-admin
118 $(call Package
/kea
/Default
)
122 define Package
/kea-admin
/description
123 A useful tool for database backend maintenance
(creating a new database
,
124 checking versions
, upgrading etc.
).
127 ###### *************************************************************************
128 define Package
/kea-hook-ha
129 $(call Package
/kea
/Default
)
130 TITLE
+=High Availability hook library
131 DEPENDS
:=+kea-libs
+kea-hook-lease-cmds
133 define Package
/kea-hook-ha
/description
134 The high availability hook library.
137 ###### *************************************************************************
138 define Package
/kea-hook-lease-cmds
139 $(call Package
/kea
/Default
)
140 TITLE
+=Lease Commands hook library
143 define Package
/kea-hook-lease-cmds
/description
144 The lease commands hook library.
147 ##### *************************************************************************
148 define Package
/kea-lfc
149 $(call Package
/kea
/Default
)
153 define Package
/kea-lfc
/description
154 This process removes redundant information from the files used to provide
155 persistent storage for the memfile data base backend. While it can be run
156 standalone
, it is normally run
as and when required by the Kea DHCP servers.
159 ##### *************************************************************************
160 define Package
/kea-perfdhcp
161 $(call Package
/kea
/Default
)
162 TITLE
+=perfdhcp
(Benchmarking
)
165 define Package
/kea-perfdhcp
/description
166 A DHCP benchmarking tool which simulates multiple clients to
test both
167 DHCPv4 and DHCPv6 server performance.
170 ###### *************************************************************************
171 define Package
/kea-shell
172 $(call Package
/kea
/Default
)
176 define Package
/kea-shell
/description
177 This simple text client uses the REST interface to connect to the Kea
181 ###### *************************************************************************
182 define Package
/kea-uci
183 $(call Package
/kea
/Default
)
185 DEPENDS
:=@
(PACKAGE_kea-ctrl||PACKAGE_kea-dhcp4||PACKAGE_kea-dhcp6||PACKAGE_kea-dhcp-ddns
)
187 define Package
/kea-uci
/description
188 Kea PROCD
/UCI support. This package installs a UCI config file and
189 a PROCD service file.
192 ###### *************************************************************************
195 --with-boost-include
="$(STAGING_DIR)/usr" \
196 --with-log4cplus
="$(STAGING_DIR)/usr" \
197 --with-openssl
="$(STAGING_DIR)/usr" \
199 $(if
$(CONFIG_PACKAGE_kea-perfdhcp
),--enable-perfdhcp
,) \
200 $(if
$(CONFIG_PACKAGE_kea-shell
),--enable-shell
,)
203 cross_compiling
="yes"
208 -ffunction-sections \
212 -Wl
,--gc-sections
,--as-needed
214 define Package
/kea-libs
/install
215 $(INSTALL_DIR
) $(1)/usr
/lib
216 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so.
* $(1)/usr
/lib
/
219 define Package
/kea-dhcp4
/install
220 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
221 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp4
$(1)/usr
/sbin
/kea-dhcp4
222 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp4.conf
$(1)/etc
/kea
/
225 define Package
/kea-dhcp6
/install
226 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
227 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp6
$(1)/usr
/sbin
/kea-dhcp6
228 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp6.conf
$(1)/etc
/kea
/
231 define Package
/kea-dhcp-ddns
/install
232 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
233 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp-ddns
$(1)/usr
/sbin
/kea-dhcp-ddns
234 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp-ddns.conf
$(1)/etc
/kea
/
237 define Package
/kea-admin
/install
238 $(INSTALL_DIR
) $(1)/usr
/sbin
239 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-admin
$(1)/usr
/sbin
/kea-admin
242 define Package
/kea-hook-ha
/install
243 $(INSTALL_DIR
) $(1)/usr
/lib
/kea
/hooks
244 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/kea
/hooks
/libdhcp_ha.so
$(1)/usr
/lib
/kea
/hooks
247 define Package
/kea-hook-lease-cmds
/install
248 $(INSTALL_DIR
) $(1)/usr
/lib
/kea
/hooks
249 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/kea
/hooks
/libdhcp_lease_cmds.so
$(1)/usr
/lib
/kea
/hooks
252 define Package
/kea-ctrl
/install
253 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
254 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/keactrl
$(1)/usr
/sbin
/keactrl
255 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-ctrl-agent
$(1)/usr
/sbin
/kea-ctrl-agent
256 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/keactrl.conf
$(1)/etc
/kea
/
257 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-ctrl-agent.conf
$(1)/etc
/kea
/
260 define Package
/kea-lfc
/install
261 $(INSTALL_DIR
) $(1)/usr
/sbin
262 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-lfc
$(1)/usr
/sbin
/kea-lfc
265 define Package
/kea-perfdhcp
/install
266 $(INSTALL_DIR
) $(1)/usr
/sbin
267 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/perfdhcp
$(1)/usr
/sbin
/perfdhcp
270 define Package
/kea-shell
/install
271 $(INSTALL_DIR
) $(1)/usr
/sbin
272 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-shell
$(1)/usr
/sbin
/kea-shell
275 define Package
/kea-uci
/install
276 $(INSTALL_DIR
) $(1)/etc
/config
$(1)/etc
/init.d
277 $(INSTALL_CONF
) .
/files
/kea.config
$(1)/etc
/config
/kea
278 $(INSTALL_BIN
) .
/files
/kea.init
$(1)/etc
/init.d
/kea
281 define Package
/kea-uci
/conffiles
285 $(eval
$(call HostBuild
))
286 $(eval
$(call BuildPackage
,kea-libs
))
287 $(eval
$(call BuildPackage
,kea-ctrl
))
288 $(eval
$(call BuildPackage
,kea-dhcp4
))
289 $(eval
$(call BuildPackage
,kea-dhcp6
))
290 $(eval
$(call BuildPackage
,kea-dhcp-ddns
))
291 $(eval
$(call BuildPackage
,kea-admin
))
292 $(eval
$(call BuildPackage
,kea-hook-ha
))
293 $(eval
$(call BuildPackage
,kea-hook-lease-cmds
))
294 $(eval
$(call BuildPackage
,kea-lfc
))
295 $(eval
$(call BuildPackage
,kea-perfdhcp
))
296 $(eval
$(call BuildPackage
,kea-shell
))
297 $(eval
$(call BuildPackage
,kea-uci
))