Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 1 | SUMMARY = "ISC Kea DHCP Server" |
| 2 | DESCRIPTION = "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." |
| 3 | HOMEPAGE = "http://kea.isc.org" |
| 4 | SECTION = "connectivity" |
| 5 | LICENSE = "MPL-2.0 & Apache-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=68d95543d2096459290a4e6b9ceccffa" |
| 7 | |
| 8 | DEPENDS = "boost log4cplus openssl" |
| 9 | |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 10 | SRC_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 Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 21 | file://0001-ax_cpp11.m4-Include-memory-header.patch \ |
| 22 | file://0001-include-limits.h.patch \ |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 23 | file://0001-add-missing-headers-in-timer_mgr.cc.patch \ |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 24 | " |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 25 | SRC_URI[sha256sum] = "486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 26 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 27 | inherit autotools systemd update-rc.d upstream-version-is-even |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 28 | |
| 29 | INITSCRIPT_NAME = "kea-dhcp4-server" |
| 30 | INITSCRIPT_PARAMS = "defaults 30" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 31 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 32 | SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 33 | SYSTEMD_AUTO_ENABLE = "disable" |
| 34 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 35 | DEBUG_OPTIMIZATION:remove:mips = " -Og" |
| 36 | DEBUG_OPTIMIZATION:append:mips = " -O" |
| 37 | BUILD_OPTIMIZATION:remove:mips = " -Og" |
| 38 | BUILD_OPTIMIZATION:append:mips = " -O" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | DEBUG_OPTIMIZATION:remove:mipsel = " -Og" |
| 41 | DEBUG_OPTIMIZATION:append:mipsel = " -O" |
| 42 | BUILD_OPTIMIZATION:remove:mipsel = " -Og" |
| 43 | BUILD_OPTIMIZATION:append:mipsel = " -O" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 44 | |
| 45 | EXTRA_OECONF = "--with-boost-libs=-lboost_system \ |
| 46 | --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \ |
| 47 | --with-openssl=${STAGING_DIR_TARGET}${prefix}" |
| 48 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 49 | do_configure:prepend() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 50 | # 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 Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 56 | # patch out build host paths for reproducibility |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | do_compile:prepend:class-target() { |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 58 | sed -i -e "s,${WORKDIR},,g" ${B}/config.report |
| 59 | } |
| 60 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 61 | do_install:append() { |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 62 | install -d ${D}${sysconfdir}/init.d |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 63 | install -d ${D}${systemd_system_unitdir} |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 64 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 65 | install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 66 | install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 67 | 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 Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 69 | ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 70 | } |
| 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | do_install:append() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 73 | rm -rf "${D}${localstatedir}" |
| 74 | } |
| 75 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 76 | CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf" |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 77 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" |
| 79 | FILES:${PN} += "${libdir}/hooks/*.so" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 80 | |
| 81 | PARALLEL_MAKEINST = "" |