blob: 2d146bf88c6f57293096c6cddcad9a04cb49b45a [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
13LICENSE = "GPLv3"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=233aa25e53983237cf0bd4c238af255f"
15
16DEPENDS = "attr tokyocabinet bison-native"
17
18SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
19 file://set-path-of-default-config-file.patch \
20 "
21SRC_URI[md5sum] = "d4dabfa46d8afa151be5610f184354e7"
22SRC_URI[sha256sum] = "fa53e137f850eb268a8e7ae4578b5db5dc383656341f5053dc1a353ed0288265"
23
24inherit autotools-brokensep systemd
25
26export EXPLICIT_VERSION="${PV}"
27
28SYSTEMD_SERVICE_${PN} = "cfengine3.service cf-apache.service cf-hub.service cf-postgres.service \
29 cf-runalerts.service cf-execd.service \
30 cf-monitord.service cf-serverd.service \
31"
32SYSTEMD_AUTO_ENABLE_${PN} = "disable"
33
34PACKAGECONFIG ??= "libpcre openssl \
35 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
36"
37PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2,"
38PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql,"
39PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql,"
40PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl,"
41PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt,"
42PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre,"
43PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl,"
44PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam,"
45PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml,"
46PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service"
47PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl,"
48
49EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet"
50
51do_install_append() {
52 install -d ${D}${localstatedir}/${BPN}/bin
53 for f in `ls ${D}${bindir}`; do
54 ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/
55 done
56
57 install -d ${D}${sysconfdir}/default
58 cat << EOF > ${D}${sysconfdir}/default/cfengine3
59RUN_CF_SERVERD=1
60RUN_CF_EXECD=1
61RUN_CF_MONITORD=1
62RUN_CF_HUB=0
63EOF
64
65 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
66 install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3
67 sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service
68 fi
69 rm -rf ${D}${datadir}/cfengine/modules/packages/zypper
70}
71
72RDEPENDS_${PN} += "${BPN}-masterfiles"