xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-connectivity/kea/kea_2.0.2.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "ISC Kea DHCP Server"
2*4882a593SmuzhiyunDESCRIPTION = "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*4882a593SmuzhiyunHOMEPAGE = "http://kea.isc.org"
4*4882a593SmuzhiyunSECTION = "connectivity"
5*4882a593SmuzhiyunLICENSE = "MPL-2.0 & Apache-2.0"
6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=b4ecee995eeb6780a17dd7e539e97abc"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunDEPENDS = "boost log4cplus openssl"
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
11*4882a593Smuzhiyun           file://kea-dhcp4.service \
12*4882a593Smuzhiyun           file://kea-dhcp6.service \
13*4882a593Smuzhiyun           file://kea-dhcp-ddns.service \
14*4882a593Smuzhiyun           file://kea-dhcp4-server \
15*4882a593Smuzhiyun           file://kea-dhcp6-server \
16*4882a593Smuzhiyun           file://kea-dhcp-ddns-server \
17*4882a593Smuzhiyun           file://fix-multilib-conflict.patch \
18*4882a593Smuzhiyun           file://fix_pid_keactrl.patch \
19*4882a593Smuzhiyun           file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
20*4882a593Smuzhiyun           "
21*4882a593SmuzhiyunSRC_URI[sha256sum] = "8d28213bdc8e2bb870a383b30ac1e53d54e1eba43d2f86e5151b08b66aa6cf32"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyuninherit autotools systemd update-rc.d upstream-version-is-even
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunINITSCRIPT_NAME = "kea-dhcp4-server"
26*4882a593SmuzhiyunINITSCRIPT_PARAMS = "defaults 30"
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"
29*4882a593SmuzhiyunSYSTEMD_AUTO_ENABLE = "disable"
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunDEBUG_OPTIMIZATION:remove:mips = " -Og"
32*4882a593SmuzhiyunDEBUG_OPTIMIZATION:append:mips = " -O"
33*4882a593SmuzhiyunBUILD_OPTIMIZATION:remove:mips = " -Og"
34*4882a593SmuzhiyunBUILD_OPTIMIZATION:append:mips = " -O"
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunDEBUG_OPTIMIZATION:remove:mipsel = " -Og"
37*4882a593SmuzhiyunDEBUG_OPTIMIZATION:append:mipsel = " -O"
38*4882a593SmuzhiyunBUILD_OPTIMIZATION:remove:mipsel = " -Og"
39*4882a593SmuzhiyunBUILD_OPTIMIZATION:append:mipsel = " -O"
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunEXTRA_OECONF = "--with-boost-libs=-lboost_system \
42*4882a593Smuzhiyun                --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
43*4882a593Smuzhiyun                --with-openssl=${STAGING_DIR_TARGET}${prefix}"
44*4882a593Smuzhiyun
45*4882a593Smuzhiyundo_configure:prepend() {
46*4882a593Smuzhiyun    # replace abs_top_builddir to avoid introducing the build path
47*4882a593Smuzhiyun    # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
48*4882a593Smuzhiyun    find ${S} -type f -name *.sh.in | xargs sed -i  "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
49*4882a593Smuzhiyun    sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
50*4882a593Smuzhiyun}
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun# patch out build host paths for reproducibility
53*4882a593Smuzhiyundo_compile:prepend:class-target() {
54*4882a593Smuzhiyun        sed -i -e "s,${WORKDIR},,g" ${B}/config.report
55*4882a593Smuzhiyun}
56*4882a593Smuzhiyun
57*4882a593Smuzhiyundo_install:append() {
58*4882a593Smuzhiyun    install -d ${D}${sysconfdir}/init.d
59*4882a593Smuzhiyun    install -d ${D}${systemd_system_unitdir}
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun    install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
62*4882a593Smuzhiyun    install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d
63*4882a593Smuzhiyun    sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
64*4882a593Smuzhiyun           -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
65*4882a593Smuzhiyun           ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
66*4882a593Smuzhiyun}
67*4882a593Smuzhiyun
68*4882a593Smuzhiyundo_install:append() {
69*4882a593Smuzhiyun    rm -rf "${D}${localstatedir}"
70*4882a593Smuzhiyun}
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunCONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunFILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
75*4882a593SmuzhiyunFILES:${PN} += "${libdir}/hooks/*.so"
76*4882a593Smuzhiyun
77*4882a593SmuzhiyunPARALLEL_MAKEINST = ""
78