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