1# 2# Copyright (C) 2014 - 2017 Wind River Systems, Inc. 3# 4SUMMARY = "CFEngine is an IT infrastructure automation framework" 5 6DESCRIPTION = "CFEngine is an IT infrastructure automation framework \ 7that helps engineers, system administrators and other stakeholders \ 8in an IT system to manage and understand IT infrastructure throughout \ 9its lifecycle. CFEngine takes systems from Build to Deploy, Manage and Audit." 10 11HOMEPAGE = "http://cfengine.com" 12 13SKIP_RECIPE[cfengine] ?= "Needs porting to openssl 3.x" 14 15LICENSE = "GPL-3.0-only" 16LIC_FILES_CHKSUM = "file://LICENSE;md5=233aa25e53983237cf0bd4c238af255f" 17 18DEPENDS += "attr tokyocabinet bison-native libxml2" 19#RDEPENDS:cfengine += "attr tokyocabinet bison-native libxml2" 20 21SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BPN}-community-${PV}.tar.gz \ 22 file://0001-Fixed-with-libxml2-no-case-in-configure.ac.patch \ 23 file://set-path-of-default-config-file.patch \ 24 " 25SRC_URI[sha256sum] = "911778ddb0a4e03a3ddfc8fc0f033136e1551849ea2dcbdb3f0f14359dfe3126" 26 27inherit autotools-brokensep systemd 28 29export EXPLICIT_VERSION="${PV}" 30 31SYSTEMD_SERVICE:${PN} = "cfengine3.service cf-apache.service cf-hub.service cf-postgres.service \ 32 cf-runalerts.service cf-execd.service \ 33 cf-monitord.service cf-serverd.service \ 34" 35SYSTEMD_AUTO_ENABLE:${PN} = "disable" 36 37PACKAGECONFIG ??= "libpcre openssl \ 38 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ 39" 40PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2," 41PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql," 42PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql," 43PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl," 44PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt," 45PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre," 46PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl," 47PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam," 48PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml," 49PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service" 50PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl," 51 52EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet" 53 54do_install:append() { 55 install -d ${D}${localstatedir}/${BPN}/bin 56 for f in `ls ${D}${bindir}`; do 57 ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/ 58 done 59 60 install -d ${D}${sysconfdir}/default 61 cat << EOF > ${D}${sysconfdir}/default/cfengine3 62RUN_CF_SERVERD=1 63RUN_CF_EXECD=1 64RUN_CF_MONITORD=1 65RUN_CF_HUB=0 66EOF 67 68 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 69 install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3 70 sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service 71 fi 72 rm -rf ${D}${datadir}/cfengine/modules/packages/zypper 73} 74 75RDEPENDS:${PN} += "${BPN}-masterfiles" 76