cfengine_3.9.0.bb 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Copyright (C) 2014 - 2016 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=cd59c3650c8b7ff36bab1cc6587b097a"
  12. DEPENDS = "attr tokyocabinet"
  13. SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
  14. file://change-hard-coded-lib-path.patch \
  15. file://set-path-of-default-config-file.patch \
  16. "
  17. SRC_URI[md5sum] = "63da39655cfca30ca885fcc4a1bf8aa4"
  18. SRC_URI[sha256sum] = "32a38aedf1199c2361e1335e0d4a1d98f9efa7cd591bcb647f35c7395bb66f2d"
  19. inherit autotools systemd
  20. export EXPLICIT_VERSION="${PV}"
  21. SYSTEMD_SERVICE_${PN} = "cfengine3.service cfengine3-web.service"
  22. SYSTEMD_AUTO_ENABLE_${PN} = "disable"
  23. PACKAGECONFIG ??= "libpcre openssl \
  24. ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
  25. ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
  26. "
  27. PACKAGECONFIG[libxml2] = "--with-libxml2=yes,--with-libxml2=no,libxml2,"
  28. PACKAGECONFIG[mysql] = "--with-mysql=yes,--with-mysql=no,mysql,"
  29. PACKAGECONFIG[postgresql] = "--with-postgresql=yes,--with-postgresql=no,postgresql,"
  30. PACKAGECONFIG[acl] = "--with-libacl=yes,--with-libacl=no,acl,"
  31. PACKAGECONFIG[libvirt] = "--with-libvirt=yes,--with-libvirt=no,libvirt,"
  32. PACKAGECONFIG[libpcre] = "--with-pcre=yes,--with-pcre=no,libpcre,"
  33. PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl,"
  34. PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam,"
  35. PACKAGECONFIG[libyaml] = "--with-libyaml,--without-libyaml,libyaml,"
  36. PACKAGECONFIG[systemd] = "--with-systemd-service=${systemd_system_unitdir},--without-systemd-service"
  37. PACKAGECONFIG[libcurl] = "--with-libcurl,--without-libcurl,curl,"
  38. EXTRA_OECONF = "hw_cv_func_va_copy=yes --with-init-script=${sysconfdir}/init.d --with-tokyocabinet"
  39. do_install_append() {
  40. install -d ${D}${localstatedir}/${BPN}/bin
  41. for f in `ls ${D}${bindir}`; do
  42. ln -s ${bindir}/`basename $f` ${D}${localstatedir}/${BPN}/bin/
  43. done
  44. install -d ${D}${sysconfdir}/default
  45. cat << EOF > ${D}${sysconfdir}/default/cfengine3
  46. RUN_CF_SERVERD=1
  47. RUN_CF_EXECD=1
  48. RUN_CF_MONITORD=1
  49. RUN_CF_HUB=0
  50. EOF
  51. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  52. install -m 0755 -D ${D}${sysconfdir}/init.d/cfengine3 ${D}${datadir}/${BPN}/cfengine3
  53. sed -i -e 's#/etc/init.d#${datadir}/${BPN}#' ${D}${systemd_system_unitdir}/*.service
  54. fi
  55. }
  56. RDEPENDS_${PN} += "${BPN}-masterfiles"