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