blob: 04424d0d70ccb6f3615a74d259300cbad564112b [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 Geisslerd159c7f2021-09-02 21:05:58 -050023 file://0001-add-missing-headers-in-timer_mgr.cc.patch \
Andrew Geissler09209ee2020-12-13 08:44:15 -060024 "
Andrew Geisslerd1e89492021-02-12 15:35:20 -060025SRC_URI[sha256sum] = "486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050026
Andrew Geissler6ce62a22020-11-30 19:58:47 -060027inherit autotools systemd update-rc.d upstream-version-is-even
Andrew Geissler4c19ea12020-10-27 13:52:24 -050028
29INITSCRIPT_NAME = "kea-dhcp4-server"
30INITSCRIPT_PARAMS = "defaults 30"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050031
Patrick Williams213cb262021-08-07 19:21:33 -050032SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050033SYSTEMD_AUTO_ENABLE = "disable"
34
Patrick Williams213cb262021-08-07 19:21:33 -050035DEBUG_OPTIMIZATION:remove:mips = " -Og"
36DEBUG_OPTIMIZATION:append:mips = " -O"
37BUILD_OPTIMIZATION:remove:mips = " -Og"
38BUILD_OPTIMIZATION:append:mips = " -O"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050039
Patrick Williams213cb262021-08-07 19:21:33 -050040DEBUG_OPTIMIZATION:remove:mipsel = " -Og"
41DEBUG_OPTIMIZATION:append:mipsel = " -O"
42BUILD_OPTIMIZATION:remove:mipsel = " -Og"
43BUILD_OPTIMIZATION:append:mipsel = " -O"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050044
45EXTRA_OECONF = "--with-boost-libs=-lboost_system \
46 --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
47 --with-openssl=${STAGING_DIR_TARGET}${prefix}"
48
Patrick Williams213cb262021-08-07 19:21:33 -050049do_configure:prepend() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -050050 # replace abs_top_builddir to avoid introducing the build path
51 # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
52 find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
53 sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
54}
55
Andrew Geissler09209ee2020-12-13 08:44:15 -060056# patch out build host paths for reproducibility
Patrick Williams213cb262021-08-07 19:21:33 -050057do_compile:prepend:class-target() {
Andrew Geissler09209ee2020-12-13 08:44:15 -060058 sed -i -e "s,${WORKDIR},,g" ${B}/config.report
59}
60
Patrick Williams213cb262021-08-07 19:21:33 -050061do_install:append() {
Andrew Geissler4c19ea12020-10-27 13:52:24 -050062 install -d ${D}${sysconfdir}/init.d
Andrew Geisslerc9f78652020-09-18 14:11:35 -050063 install -d ${D}${systemd_system_unitdir}
Andrew Geissler4c19ea12020-10-27 13:52:24 -050064
Andrew Geisslerc9f78652020-09-18 14:11:35 -050065 install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
Andrew Geissler4c19ea12020-10-27 13:52:24 -050066 install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d
Andrew Geisslerc9f78652020-09-18 14:11:35 -050067 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
68 -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050069 ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
Andrew Geisslerc9f78652020-09-18 14:11:35 -050070}
71
Patrick Williams213cb262021-08-07 19:21:33 -050072do_install:append() {
Andrew Geisslerc9f78652020-09-18 14:11:35 -050073 rm -rf "${D}${localstatedir}"
74}
75
Patrick Williams213cb262021-08-07 19:21:33 -050076CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
Andrew Geissler4c19ea12020-10-27 13:52:24 -050077
Patrick Williams213cb262021-08-07 19:21:33 -050078FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
79FILES:${PN} += "${libdir}/hooks/*.so"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050080
81PARALLEL_MAKEINST = ""