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 | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 23 | " |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 24 | SRC_URI[sha256sum] = "486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 25 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 26 | inherit autotools systemd update-rc.d upstream-version-is-even |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 27 | |
| 28 | INITSCRIPT_NAME = "kea-dhcp4-server" |
| 29 | INITSCRIPT_PARAMS = "defaults 30" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 30 | |
| 31 | SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" |
| 32 | SYSTEMD_AUTO_ENABLE = "disable" |
| 33 | |
| 34 | DEBUG_OPTIMIZATION_remove_mips = " -Og" |
| 35 | DEBUG_OPTIMIZATION_append_mips = " -O" |
| 36 | BUILD_OPTIMIZATION_remove_mips = " -Og" |
| 37 | BUILD_OPTIMIZATION_append_mips = " -O" |
| 38 | |
| 39 | DEBUG_OPTIMIZATION_remove_mipsel = " -Og" |
| 40 | DEBUG_OPTIMIZATION_append_mipsel = " -O" |
| 41 | BUILD_OPTIMIZATION_remove_mipsel = " -Og" |
| 42 | BUILD_OPTIMIZATION_append_mipsel = " -O" |
| 43 | |
| 44 | EXTRA_OECONF = "--with-boost-libs=-lboost_system \ |
| 45 | --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \ |
| 46 | --with-openssl=${STAGING_DIR_TARGET}${prefix}" |
| 47 | |
| 48 | do_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 Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 55 | # patch out build host paths for reproducibility |
| 56 | do_compile_prepend_class-target() { |
| 57 | sed -i -e "s,${WORKDIR},,g" ${B}/config.report |
| 58 | } |
| 59 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 60 | do_install_append() { |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 61 | install -d ${D}${sysconfdir}/init.d |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 62 | install -d ${D}${systemd_system_unitdir} |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 63 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 64 | install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 65 | install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 66 | 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 Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 68 | ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | do_install_append() { |
| 72 | rm -rf "${D}${localstatedir}" |
| 73 | } |
| 74 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 75 | CONFFILES_${PN} = "${sysconfdir}/kea/keactrl.conf" |
| 76 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 77 | FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" |
| 78 | FILES_${PN} += "${libdir}/hooks/*.so" |
| 79 | |
| 80 | PARALLEL_MAKEINST = "" |