blob: 2c2e5a74ddac5ec2abedf6cebdca2c9ed957493b [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -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"
6LIC_FILES_CHKSUM = "file://COPYING;md5=97ce14bdd2733f5b84ab5e29380d057d"
7
8DEPENDS = "boost log4cplus openssl"
9
10SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
11 file://kea-dhcp4.service \
12 file://kea-dhcp6.service \
13 file://kea-dhcp-ddns.service \
14 file://kea-dhcp4-server \
15 file://kea-dhcp6-server \
16 file://kea-dhcp-ddns-server \
17 file://fix-multilib-conflict.patch \
18 file://fix_pid_keactrl.patch \
19 file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
20 "
21SRC_URI[sha256sum] = "da7d90ca62a772602dac6e77e507319038422895ad68eeb142f1487d67d531d2"
22
23inherit autotools systemd update-rc.d upstream-version-is-even
24
25INITSCRIPT_NAME = "kea-dhcp4-server"
26INITSCRIPT_PARAMS = "defaults 30"
27
28SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
29SYSTEMD_AUTO_ENABLE = "disable"
30
31DEBUG_OPTIMIZATION:remove:mips = " -Og"
32DEBUG_OPTIMIZATION:append:mips = " -O"
33BUILD_OPTIMIZATION:remove:mips = " -Og"
34BUILD_OPTIMIZATION:append:mips = " -O"
35
36DEBUG_OPTIMIZATION:remove:mipsel = " -Og"
37DEBUG_OPTIMIZATION:append:mipsel = " -O"
38BUILD_OPTIMIZATION:remove:mipsel = " -Og"
39BUILD_OPTIMIZATION:append:mipsel = " -O"
40
41EXTRA_OECONF = "--with-boost-libs=-lboost_system \
42 --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
43 --with-openssl=${STAGING_DIR_TARGET}${prefix}"
44
45do_configure:prepend() {
46 # replace abs_top_builddir to avoid introducing the build path
47 # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
48 find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
49 sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
50}
51
52# patch out build host paths for reproducibility
53do_compile:prepend:class-target() {
54 sed -i -e "s,${WORKDIR},,g" ${B}/config.report
55}
56
57do_install:append() {
58 install -d ${D}${sysconfdir}/init.d
59 install -d ${D}${systemd_system_unitdir}
60
61 install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
62 install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d
63 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
64 -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
65 ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
66}
67
68do_install:append() {
69 rm -rf "${D}${localstatedir}"
70}
71
72CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
73
74FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
75FILES:${PN} += "${libdir}/hooks/*.so"
76
77PARALLEL_MAKEINST = ""