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
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
24 PKG_BUILD_FLAGS
:=gc-sections
29 include $(INCLUDE_DIR
)/package.mk
31 define Package
/kea
/Default
34 SUBMENU
:=IP Addresses and Names
36 URL
:=https
://www.isc.org
/kea
39 define Package
/kea
/conffiles
43 Package
/kea-ctrl
/conffiles
= $(Package
/kea
/conffiles
)
44 Package
/kea-dhcp4
/conffiles
= $(Package
/kea
/conffiles
)
45 Package
/kea-dhcp6
/conffiles
= $(Package
/kea
/conffiles
)
46 Package
/kea-dhcp-ddns
/conffiles
= $(Package
/kea
/conffiles
)
48 ###### *************************************************************************
50 $(call Package
/kea
/Default
)
53 # shown in LuCI package description
54 define Package
/kea
/description
55 Kea is an open source DHCPv4
/DHCPv6 server being developed by Internet
56 Systems Consortium. Kea is a high-performance
, extensible DHCP server
57 engine that is designed to be easily modified and extended with hooks
58 libraries. It provides DHCPv4 and DHCPv6 servers
, a dynamic DNS update
59 module
, a portable DHCP library
, libdhcp
++, control agent that provides
60 management REST interface
, and a DHCP benchmarking tool
, perfdhcp.
63 ###### *************************************************************************
64 define Package
/kea-libs
65 $(call Package
/kea
/Default
)
67 DEPENDS
:=+libopenssl
+log4cplus \
70 define Package
/kea-libs
/description
71 Kea required Libraries.
74 ###### *************************************************************************
75 define Package
/kea-ctrl
76 $(call Package
/kea
/Default
)
78 DEPENDS
:=+procps-ng
+procps-ng-ps
+kea-dhcp4 \
79 +IPV6
:kea-dhcp6
+kea-dhcp-ddns
81 define Package
/kea-ctrl
/description
82 Tool to start
, stop
, reconfigure
, and report status for the Kea servers.
85 ###### *************************************************************************
86 define Package
/kea-dhcp4
87 $(call Package
/kea
/Default
)
91 define Package
/kea-dhcp4
/description
92 The DHCPv4 server process. This process responds to DHCPv4 queries from clients.
95 ###### *************************************************************************
96 define Package
/kea-dhcp6
97 $(call Package
/kea
/Default
)
99 DEPENDS
:=@IPV6
+kea-libs
101 define Package
/kea-dhcp6
/description
102 The DHCPv6 server process. This process responds to DHCPv6 queries from clients.
105 ###### *************************************************************************
106 define Package
/kea-dhcp-ddns
107 $(call Package
/kea
/Default
)
108 TITLE
+=DHCP Dynamic DNS
111 define Package
/kea-dhcp-ddns
/description
112 The DHCP Dynamic DNS process. This process acts
as an intermediary between
113 the DHCP servers and DNS servers. It receives name update requests from the
114 DHCP servers and sends DNS Update messages to the DNS servers.
117 ###### *************************************************************************
118 define Package
/kea-admin
119 $(call Package
/kea
/Default
)
123 define Package
/kea-admin
/description
124 A useful tool for database backend maintenance
(creating a new database
,
125 checking versions
, upgrading etc.
).
128 ###### *************************************************************************
129 define Package
/kea-hook-ha
130 $(call Package
/kea
/Default
)
131 TITLE
+=High Availability hook library
132 DEPENDS
:=+kea-libs
+kea-hook-lease-cmds
134 define Package
/kea-hook-ha
/description
135 The high availability hook library.
138 ###### *************************************************************************
139 define Package
/kea-hook-lease-cmds
140 $(call Package
/kea
/Default
)
141 TITLE
+=Lease Commands hook library
144 define Package
/kea-hook-lease-cmds
/description
145 The lease commands hook library.
148 ##### *************************************************************************
149 define Package
/kea-lfc
150 $(call Package
/kea
/Default
)
154 define Package
/kea-lfc
/description
155 This process removes redundant information from the files used to provide
156 persistent storage for the memfile data base backend. While it can be run
157 standalone
, it is normally run
as and when required by the Kea DHCP servers.
160 ##### *************************************************************************
161 define Package
/kea-perfdhcp
162 $(call Package
/kea
/Default
)
163 TITLE
+=perfdhcp
(Benchmarking
)
166 define Package
/kea-perfdhcp
/description
167 A DHCP benchmarking tool which simulates multiple clients to
test both
168 DHCPv4 and DHCPv6 server performance.
171 ###### *************************************************************************
172 define Package
/kea-shell
173 $(call Package
/kea
/Default
)
177 define Package
/kea-shell
/description
178 This simple text client uses the REST interface to connect to the Kea
182 ###### *************************************************************************
183 define Package
/kea-uci
184 $(call Package
/kea
/Default
)
186 DEPENDS
:=@
(PACKAGE_kea-ctrl||PACKAGE_kea-dhcp4||PACKAGE_kea-dhcp6||PACKAGE_kea-dhcp-ddns
)
188 define Package
/kea-uci
/description
189 Kea PROCD
/UCI support. This package installs a UCI config file and
190 a PROCD service file.
193 ###### *************************************************************************
196 --with-boost-include
="$(STAGING_DIR)/usr" \
197 --with-log4cplus
="$(STAGING_DIR)/usr" \
198 --with-openssl
="$(STAGING_DIR)/usr" \
200 $(if
$(CONFIG_PACKAGE_kea-perfdhcp
),--enable-perfdhcp
,) \
201 $(if
$(CONFIG_PACKAGE_kea-shell
),--enable-shell
,)
204 cross_compiling
="yes"
213 define Package
/kea-libs
/install
214 $(INSTALL_DIR
) $(1)/usr
/lib
215 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so.
* $(1)/usr
/lib
/
218 define Package
/kea-dhcp4
/install
219 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
220 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp4
$(1)/usr
/sbin
/kea-dhcp4
221 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp4.conf
$(1)/etc
/kea
/
224 define Package
/kea-dhcp6
/install
225 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
226 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp6
$(1)/usr
/sbin
/kea-dhcp6
227 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp6.conf
$(1)/etc
/kea
/
230 define Package
/kea-dhcp-ddns
/install
231 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
232 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp-ddns
$(1)/usr
/sbin
/kea-dhcp-ddns
233 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp-ddns.conf
$(1)/etc
/kea
/
236 define Package
/kea-admin
/install
237 $(INSTALL_DIR
) $(1)/usr
/sbin
238 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-admin
$(1)/usr
/sbin
/kea-admin
241 define Package
/kea-hook-ha
/install
242 $(INSTALL_DIR
) $(1)/usr
/lib
/kea
/hooks
243 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/kea
/hooks
/libdhcp_ha.so
$(1)/usr
/lib
/kea
/hooks
246 define Package
/kea-hook-lease-cmds
/install
247 $(INSTALL_DIR
) $(1)/usr
/lib
/kea
/hooks
248 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/kea
/hooks
/libdhcp_lease_cmds.so
$(1)/usr
/lib
/kea
/hooks
251 define Package
/kea-ctrl
/install
252 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
253 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/keactrl
$(1)/usr
/sbin
/keactrl
254 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-ctrl-agent
$(1)/usr
/sbin
/kea-ctrl-agent
255 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/keactrl.conf
$(1)/etc
/kea
/
256 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-ctrl-agent.conf
$(1)/etc
/kea
/
259 define Package
/kea-lfc
/install
260 $(INSTALL_DIR
) $(1)/usr
/sbin
261 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-lfc
$(1)/usr
/sbin
/kea-lfc
264 define Package
/kea-perfdhcp
/install
265 $(INSTALL_DIR
) $(1)/usr
/sbin
266 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/perfdhcp
$(1)/usr
/sbin
/perfdhcp
269 define Package
/kea-shell
/install
270 $(INSTALL_DIR
) $(1)/usr
/sbin
271 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-shell
$(1)/usr
/sbin
/kea-shell
274 define Package
/kea-uci
/install
275 $(INSTALL_DIR
) $(1)/etc
/config
$(1)/etc
/init.d
276 $(INSTALL_CONF
) .
/files
/kea.config
$(1)/etc
/config
/kea
277 $(INSTALL_BIN
) .
/files
/kea.init
$(1)/etc
/init.d
/kea
280 define Package
/kea-uci
/conffiles
284 $(eval
$(call HostBuild
))
285 $(eval
$(call BuildPackage
,kea-libs
))
286 $(eval
$(call BuildPackage
,kea-ctrl
))
287 $(eval
$(call BuildPackage
,kea-dhcp4
))
288 $(eval
$(call BuildPackage
,kea-dhcp6
))
289 $(eval
$(call BuildPackage
,kea-dhcp-ddns
))
290 $(eval
$(call BuildPackage
,kea-admin
))
291 $(eval
$(call BuildPackage
,kea-hook-ha
))
292 $(eval
$(call BuildPackage
,kea-hook-lease-cmds
))
293 $(eval
$(call BuildPackage
,kea-lfc
))
294 $(eval
$(call BuildPackage
,kea-perfdhcp
))
295 $(eval
$(call BuildPackage
,kea-shell
))
296 $(eval
$(call BuildPackage
,kea-uci
))