blob: fe10d90620decff812bbe1ea40e2e54ab8a9d289 [file] [log] [blame]
Andrew Geisslerc9f78652020-09-18 14:11:35 -05001SUMMARY = "ISC Kea DHCP Server"
2DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS."
3HOMEPAGE = "http://kea.isc.org"
4SECTION = "connectivity"
5LICENSE = "MPL-2.0 & Apache-2.0"
6LIC_FILES_CHKSUM = "file://COPYING;md5=68d95543d2096459290a4e6b9ceccffa"
7
8DEPENDS = "boost log4cplus openssl"
9
Andrew Geissler09209ee2020-12-13 08:44:15 -060010SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
11 file://0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch \
12 file://kea-dhcp4.service \
13 file://kea-dhcp6.service \
14 file://kea-dhcp-ddns.service \
15 file://kea-dhcp4-server \
16 file://kea-dhcp6-server \
17 file://kea-dhcp-ddns-server \
18 file://fix-multilib-conflict.patch \
19 file://fix_pid_keactrl.patch \
20 file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
Andrew Geissler90fd73c2021-03-05 15:25:55 -060021 file://0001-ax_cpp11.m4-Include-memory-header.patch \
22 file://0001-include-limits.h.patch \
Andrew Geissler09209ee2020-12-13 08:44:15 -060023 "
Andrew Geisslerd1e89492021-02-12 15:35:20 -060024SRC_URI[sha256sum] = "486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050025
Andrew Geissler6ce62a22020-11-30 19:58:47 -060026inherit autotools systemd update-rc.d upstream-version-is-even
Andrew Geissler4c19ea12020-10-27 13:52:24 -050027
28INITSCRIPT_NAME = "kea-dhcp4-server"
29INITSCRIPT_PARAMS = "defaults 30"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050030
31SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
32SYSTEMD_AUTO_ENABLE = "disable"
33
34DEBUG_OPTIMIZATION_remove_mips = " -Og"
35DEBUG_OPTIMIZATION_append_mips = " -O"
36BUILD_OPTIMIZATION_remove_mips = " -Og"
37BUILD_OPTIMIZATION_append_mips = " -O"
38
39DEBUG_OPTIMIZATION_remove_mipsel = " -Og"
40DEBUG_OPTIMIZATION_append_mipsel = " -O"
41BUILD_OPTIMIZATION_remove_mipsel = " -Og"
42BUILD_OPTIMIZATION_append_mipsel = " -O"
43
44EXTRA_OECONF = "--with-boost-libs=-lboost_system \
45 --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
46 --with-openssl=${STAGING_DIR_TARGET}${prefix}"
47
48do_configure_prepend() {
49 # replace abs_top_builddir to avoid introducing the build path
50 # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
51 find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
52 sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
53}
54
Andrew Geissler09209ee2020-12-13 08:44:15 -060055# patch out build host paths for reproducibility
56do_compile_prepend_class-target() {
57 sed -i -e "s,${WORKDIR},,g" ${B}/config.report
58}
59
Andrew Geisslerc9f78652020-09-18 14:11:35 -050060do_install_append() {
Andrew Geissler4c19ea12020-10-27 13:52:24 -050061 install -d ${D}${sysconfdir}/init.d
Andrew Geisslerc9f78652020-09-18 14:11:35 -050062 install -d ${D}${systemd_system_unitdir}
Andrew Geissler4c19ea12020-10-27 13:52:24 -050063
Andrew Geisslerc9f78652020-09-18 14:11:35 -050064 install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
Andrew Geissler4c19ea12020-10-27 13:52:24 -050065 install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d
Andrew Geisslerc9f78652020-09-18 14:11:35 -050066 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
67 -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050068 ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
Andrew Geisslerc9f78652020-09-18 14:11:35 -050069}
70
71do_install_append() {
72 rm -rf "${D}${localstatedir}"
73}
74
Andrew Geissler4c19ea12020-10-27 13:52:24 -050075CONFFILES_${PN} = "${sysconfdir}/kea/keactrl.conf"
76
Andrew Geisslerc9f78652020-09-18 14:11:35 -050077FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
78FILES_${PN} += "${libdir}/hooks/*.so"
79
80PARALLEL_MAKEINST = ""