1 FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
2 SRC_URI_append = " file://0001-gcc-7-requires-include-functional-for-std-function.patch"
4 CXXFLAGS_append = " -Wimplicit-fallthrough=0"
6 pkg_postinst_${PN} () {
10 # It would be nice to run the code below while building an image,
11 # but currently the calls to cynara-db-chsgen (a binary) in
12 # cynara-db-migration (a script) prevent that. Rely instead
13 # on OE's support for running failed postinst scripts at first boot.
14 if [ x"$D" != "x" ]; then
18 mkdir -p $D${sysconfdir}/cynara
19 ${CHSMACK} -a System $D${sysconfdir}/cynara
21 # Strip git patch level information, the version comparison code
22 # in cynara-db-migration only expect major.minor.patch version numbers.
23 VERSION=${@d.getVar('PV',d,1).split('+git')[0]}
24 if [ -d $D${localstatedir}/cynara ] ; then
26 echo "NOTE: updating cynara DB to version $VERSION"
27 $D${sbindir}/cynara-db-migration upgrade -f 0.0.0 -t $VERSION
30 echo "NOTE: creating cynara DB for version $VERSION"
31 mkdir -p $D${localstatedir}/cynara
32 ${CHSMACK} -a System $D${localstatedir}/cynara
33 $D${sbindir}/cynara-db-migration install -t $VERSION
36 # Workaround for systemd.bbclass issue: it would call
37 # "systemctl start" without "--no-block", but because
38 # the service is not ready to run at the time when
39 # this scripts gets executed by run-postinsts.service,
41 echo "NOTE: enabling and starting cynara service"
42 systemctl enable cynara
43 systemctl start --no-block cynara