cherokee_git.bb 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. SUMMARY = "Cherokee Web Server fast and secure"
  2. SUMMARY_cget = "Small downloader based in the Cherokee client library"
  3. HOMEPAGE = "http://www.cherokee-project.com/"
  4. SECTION = "network"
  5. LICENSE = "GPLv2"
  6. LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
  7. DEPENDS = "unzip-native libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
  8. SRCREV = "9a75e65b876bcc376cb6b379dca1f7ce4a055c59"
  9. PV = "1.2.104+git${SRCPV}"
  10. SRC_URI = "git://github.com/cherokee/webserver \
  11. file://cherokee.init \
  12. file://cherokee.service \
  13. file://cherokee-install-configured.py-once.patch \
  14. file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \
  15. file://0001-make-Do-not-build-po-files.patch \
  16. file://0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch \
  17. "
  18. S = "${WORKDIR}/git"
  19. inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)}
  20. PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
  21. PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
  22. PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
  23. PACKAGECONFIG[geoip] = "--with-geoip,--without-geoip,geoip"
  24. PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
  25. EXTRA_OECONF = "--disable-static \
  26. --disable-nls \
  27. ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
  28. --with-wwwroot=${localstatedir}/www/cherokee \
  29. "
  30. do_install_append () {
  31. install -m 0755 -d ${D}${sysconfdir}/init.d
  32. install -m 755 ${WORKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee
  33. # clean up .la files for plugins
  34. rm -f ${D}${libdir}/cherokee/*.la
  35. install -d ${D}${systemd_unitdir}/system
  36. install -m 0644 ${WORKDIR}/cherokee.service ${D}${systemd_unitdir}/system
  37. rmdir "${D}${localstatedir}/run"
  38. rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
  39. }
  40. # Put -dev near the front so we can move the .la files into it with a wildcard
  41. PACKAGES =+ "libcherokee-server libcherokee-client libcherokee-base cget"
  42. FILES_cget = "${bindir}/cget"
  43. FILES_libcherokee-server = "${libdir}/libcherokee-server${SOLIBS}"
  44. FILES_libcherokee-client = "${libdir}/libcherokee-client${SOLIBS}"
  45. FILES_libcherokee-base = "${libdir}/libcherokee-base${SOLIBS}"
  46. # Pack the htdocs
  47. FILES_${PN} += "${localstatedir}/www/cherokee"
  48. CONFFILES_${PN} = " \
  49. ${sysconfdir}/cherokee/cherokee.conf \
  50. ${sysconfdir}/init.d/cherokee \
  51. "
  52. INITSCRIPT_NAME = "cherokee"
  53. INITSCRIPT_PARAMS = "defaults 91 91"
  54. RPROVIDES_${PN} += "${PN}-systemd"
  55. RREPLACES_${PN} += "${PN}-systemd"
  56. RCONFLICTS_${PN} += "${PN}-systemd"
  57. SYSTEMD_SERVICE_${PN} = "cherokee.service"
  58. python() {
  59. if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
  60. raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
  61. }