cfengine_3.15.0.bb 2.9 KB

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