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
:=486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39
19 PKG_MAINTAINER
:=BangLang Huang
<banglang.huang@foxmail.com
>, Rosy Song
<rosysong@rosinson.com
>
21 PKG_LICENSE_FILES
:=COPYING
23 HOST_BUILD_DEPENDS
:=boost
/host log4cplus
/host
24 PKG_BUILD_DEPENDS
:=kea
/host
25 HOST_BUILD_PARALLEL
:=1
31 include $(INCLUDE_DIR
)/package.mk
32 include $(INCLUDE_DIR
)/host-build.mk
34 define Package
/kea
/Default
37 SUBMENU
:=IP Addresses and Names
39 URL
:=https
://www.isc.org
/kea
42 define Package
/kea
/conffiles
46 Package
/kea-ctrl
/conffiles
= $(Package
/kea
/conffiles
)
47 Package
/kea-dhcp4
/conffiles
= $(Package
/kea
/conffiles
)
48 Package
/kea-dhcp6
/conffiles
= $(Package
/kea
/conffiles
)
49 Package
/kea-dhcp-ddns
/conffiles
= $(Package
/kea
/conffiles
)
51 ###### *************************************************************************
53 $(call Package
/kea
/Default
)
56 # shown in LuCI package description
57 define Package
/kea
/description
58 Kea is an open source DHCPv4
/DHCPv6 server being developed by Internet
59 Systems Consortium. Kea is a high-performance
, extensible DHCP server
60 engine that is designed to be easily modified and extended with hooks
61 libraries. It provides DHCPv4 and DHCPv6 servers
, a dynamic DNS update
62 module
, a portable DHCP library
, libdhcp
++, control agent that provides
63 management REST interface
, and a DHCP benchmarking tool
, perfdhcp.
66 ###### *************************************************************************
67 define Package
/kea-libs
68 $(call Package
/kea
/Default
)
70 DEPENDS
:=+libopenssl
+log4cplus \
73 define Package
/kea-libs
/description
74 Kea required Libraries.
77 ###### *************************************************************************
78 define Package
/kea-ctrl
79 $(call Package
/kea
/Default
)
81 DEPENDS
:=+procps-ng
+procps-ng-ps
+kea-dhcp4 \
82 +IPV6
:kea-dhcp6
+kea-dhcp-ddns
84 define Package
/kea-ctrl
/description
85 Tool to start
, stop
, reconfigure
, and report status for the Kea servers.
88 ###### *************************************************************************
89 define Package
/kea-dhcp4
90 $(call Package
/kea
/Default
)
94 define Package
/kea-dhcp4
/description
95 The DHCPv4 server process. This process responds to DHCPv4 queries from clients.
98 ###### *************************************************************************
99 define Package
/kea-dhcp6
100 $(call Package
/kea
/Default
)
101 TITLE
+=DHCP Server v6
102 DEPENDS
:=@IPV6
+kea-libs
104 define Package
/kea-dhcp6
/description
105 The DHCPv6 server process. This process responds to DHCPv6 queries from clients.
108 ###### *************************************************************************
109 define Package
/kea-dhcp-ddns
110 $(call Package
/kea
/Default
)
111 TITLE
+=DHCP Dynamic DNS
114 define Package
/kea-dhcp-ddns
/description
115 The DHCP Dynamic DNS process. This process acts
as an intermediary between
116 the DHCP servers and DNS servers. It receives name update requests from the
117 DHCP servers and sends DNS Update messages to the DNS servers.
120 ###### *************************************************************************
121 define Package
/kea-admin
122 $(call Package
/kea
/Default
)
126 define Package
/kea-admin
/description
127 A useful tool for database backend maintenance
(creating a new database
,
128 checking versions
, upgrading etc.
).
131 ###### *************************************************************************
132 define Package
/kea-hook-ha
133 $(call Package
/kea
/Default
)
134 TITLE
+=High Availability hook library
135 DEPENDS
:=+kea-libs
+kea-hook-lease-cmds
137 define Package
/kea-hook-ha
/description
138 The high availability hook library.
141 ###### *************************************************************************
142 define Package
/kea-hook-lease-cmds
143 $(call Package
/kea
/Default
)
144 TITLE
+=Lease Commands hook library
147 define Package
/kea-hook-lease-cmds
/description
148 The lease commands hook library.
151 ##### *************************************************************************
152 define Package
/kea-lfc
153 $(call Package
/kea
/Default
)
157 define Package
/kea-lfc
/description
158 This process removes redundant information from the files used to provide
159 persistent storage for the memfile data base backend. While it can be run
160 standalone
, it is normally run
as and when required by the Kea DHCP servers.
163 ##### *************************************************************************
164 define Package
/kea-perfdhcp
165 $(call Package
/kea
/Default
)
166 TITLE
+=perfdhcp
(Benchmarking
)
169 define Package
/kea-perfdhcp
/description
170 A DHCP benchmarking tool which simulates multiple clients to
test both
171 DHCPv4 and DHCPv6 server performance.
174 ###### *************************************************************************
175 define Package
/kea-shell
176 $(call Package
/kea
/Default
)
180 define Package
/kea-shell
/description
181 This simple text client uses the REST interface to connect to the Kea
185 ###### *************************************************************************
186 HOST_CONFIGURE_ARGS
+= \
187 --with-boost-include
="$(STAGING_DIR_HOSTPKG)" \
188 --with-log4cplus
="$(STAGING_DIR_HOSTPKG)" \
189 --with-openssl
="$(STAGING_DIR_HOST)" \
190 --enable-generate-messages
193 -Wl
,--gc-sections
,--as-needed
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"
209 -ffunction-sections \
213 -Wl
,--gc-sections
,--as-needed
215 # Only compile the kea-msg-compiler which we need for
216 # package compilation
219 $(MAKE
) $(HOST_JOBS
) -C
$(HOST_BUILD_DIR
)/src
/lib
/exceptions
$(HOST_MAKE_FLAGS
)
221 $(MAKE
) $(HOST_JOBS
) -C
$(HOST_BUILD_DIR
)/src
/lib
/util
$(HOST_MAKE_FLAGS
)
223 $(MAKE
) $(HOST_JOBS
) -C
$(HOST_BUILD_DIR
)/src
/lib
/log
$(HOST_MAKE_FLAGS
)
227 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/src
/lib
/log
/compiler
/kea-msg-compiler \
228 $(STAGING_DIR_HOSTPKG
)/bin
/
232 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)/src
/lib
/log
/compiler
233 $(INSTALL_BIN
) $(STAGING_DIR_HOSTPKG
)/bin
/kea-msg-compiler \
234 $(PKG_BUILD_DIR
)/src
/lib
/log
/compiler
/
235 $(call Build
/Compile
/Default
)
238 define Package
/kea-libs
/install
239 $(INSTALL_DIR
) $(1)/usr
/lib
240 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.so.
* $(1)/usr
/lib
/
243 define Package
/kea-dhcp4
/install
244 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
245 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp4
$(1)/usr
/sbin
/kea-dhcp4
246 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp4.conf
$(1)/etc
/kea
/
249 define Package
/kea-dhcp6
/install
250 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
251 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp6
$(1)/usr
/sbin
/kea-dhcp6
252 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp6.conf
$(1)/etc
/kea
/
255 define Package
/kea-dhcp-ddns
/install
256 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
257 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-dhcp-ddns
$(1)/usr
/sbin
/kea-dhcp-ddns
258 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-dhcp-ddns.conf
$(1)/etc
/kea
/
261 define Package
/kea-admin
/install
262 $(INSTALL_DIR
) $(1)/usr
/sbin
263 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-admin
$(1)/usr
/sbin
/kea-admin
266 define Package
/kea-hook-ha
/install
267 $(INSTALL_DIR
) $(1)/usr
/lib
/kea
/hooks
268 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/kea
/hooks
/libdhcp_ha.so
$(1)/usr
/lib
/kea
/hooks
271 define Package
/kea-hook-lease-cmds
/install
272 $(INSTALL_DIR
) $(1)/usr
/lib
/kea
/hooks
273 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/kea
/hooks
/libdhcp_lease_cmds.so
$(1)/usr
/lib
/kea
/hooks
276 define Package
/kea-ctrl
/install
277 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/kea
278 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/keactrl
$(1)/usr
/sbin
/keactrl
279 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-ctrl-agent
$(1)/usr
/sbin
/kea-ctrl-agent
280 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/keactrl.conf
$(1)/etc
/kea
/
281 $(CP
) $(PKG_INSTALL_DIR
)/etc
/kea
/kea-ctrl-agent.conf
$(1)/etc
/kea
/
284 define Package
/kea-lfc
/install
285 $(INSTALL_DIR
) $(1)/usr
/sbin
286 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-lfc
$(1)/usr
/sbin
/kea-lfc
289 define Package
/kea-perfdhcp
/install
290 $(INSTALL_DIR
) $(1)/usr
/sbin
291 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/perfdhcp
$(1)/usr
/sbin
/perfdhcp
294 define Package
/kea-shell
/install
295 $(INSTALL_DIR
) $(1)/usr
/sbin
296 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/kea-shell
$(1)/usr
/sbin
/kea-shell
299 $(eval
$(call HostBuild
))
300 $(eval
$(call BuildPackage
,kea-libs
))
301 $(eval
$(call BuildPackage
,kea-ctrl
))
302 $(eval
$(call BuildPackage
,kea-dhcp4
))
303 $(eval
$(call BuildPackage
,kea-dhcp6
))
304 $(eval
$(call BuildPackage
,kea-dhcp-ddns
))
305 $(eval
$(call BuildPackage
,kea-admin
))
306 $(eval
$(call BuildPackage
,kea-hook-ha
))
307 $(eval
$(call BuildPackage
,kea-hook-lease-cmds
))
308 $(eval
$(call BuildPackage
,kea-lfc
))
309 $(eval
$(call BuildPackage
,kea-perfdhcp
))
310 $(eval
$(call BuildPackage
,kea-shell
))