blob: 6fa5d2743a270434cf7dd15eadaa0cf6255d83de [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001#
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
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000013SKIP_RECIPE[cfengine] ?= "Needs porting to openssl 3.x"
Andrew Geisslereff27472021-10-29 15:35:00 -050014
Andrew Geissler9aee5002022-03-30 16:27:02 +000015LICENSE = "GPL-3.0-only"
Andrew Geissler82c905d2020-04-13 13:39:40 -050016LIC_FILES_CHKSUM = "file://LICENSE;md5=233aa25e53983237cf0bd4c238af255f"
17
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060018DEPENDS += "attr tokyocabinet bison-native libxml2"
19#RDEPENDS:cfengine += "attr tokyocabinet bison-native libxml2"
Andrew Geissler82c905d2020-04-13 13:39:40 -050020
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060021SRC_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 \
Andrew Geissler82c905d2020-04-13 13:39:40 -050023 file://set-path-of-default-config-file.patch \
24 "
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060025#SRC_URI[md5sum] = "5318e40702bc66a3ece44ec4ad77712b"
26SRC_URI[sha256sum] = "911778ddb0a4e03a3ddfc8fc0f033136e1551849ea2dcbdb3f0f14359dfe3126"
Andrew Geissler82c905d2020-04-13 13:39:40 -050027
28inherit autotools-brokensep systemd
29
30export EXPLICIT_VERSION="${PV}"
31
Patrick Williams213cb262021-08-07 19:21:33 -050032SYSTEMD_SERVICE:${PN} = "cfengine3.service cf-apache.service cf-hub.service cf-postgres.service \
Andrew Geissler82c905d2020-04-13 13:39:40 -050033 cf-runalerts.service cf-execd.service \
34 cf-monitord.service cf-serverd.service \
35"
Patrick Williams213cb262021-08-07 19:21:33 -050036SYSTEMD_AUTO_ENABLE:${PN} = "disable"
Andrew Geissler82c905d2020-04-13 13:39:40 -050037
38PACKAGECONFIG ??= "libpcre openssl \
39 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
40"
41PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2,"
42PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql,"
43PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql,"
44PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl,"
45PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt,"
46PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre,"
47PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl,"
48PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam,"
49PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml,"
50PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service"
51PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl,"
52
53EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet"
54
Patrick Williams213cb262021-08-07 19:21:33 -050055do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050056 install -d ${D}${localstatedir}/${BPN}/bin
57 for f in `ls ${D}${bindir}`; do
58 ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/
59 done
60
61 install -d ${D}${sysconfdir}/default
62 cat << EOF > ${D}${sysconfdir}/default/cfengine3
63RUN_CF_SERVERD=1
64RUN_CF_EXECD=1
65RUN_CF_MONITORD=1
66RUN_CF_HUB=0
67EOF
68
69 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
70 install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3
71 sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service
72 fi
73 rm -rf ${D}${datadir}/cfengine/modules/packages/zypper
74}
75
Patrick Williams213cb262021-08-07 19:21:33 -050076RDEPENDS:${PN} += "${BPN}-masterfiles"