blob: 16733c6621781e62fc8e881ebf21158566a1746e [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "Cherokee Web Server fast and secure"
Patrick Williams213cb262021-08-07 19:21:33 -05002SUMMARY:cget = "Small downloader based in the Cherokee client library"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003HOMEPAGE = "http://www.cherokee-project.com/"
4SECTION = "network"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
7
8DEPENDS = "unzip-native libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
9
Brad Bishop87b3cb82019-11-15 16:35:37 -050010SRCREV = "9a75e65b876bcc376cb6b379dca1f7ce4a055c59"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011PV = "1.2.104+git${SRCPV}"
Andrew Geissler595f6302022-01-24 19:11:47 +000012SRC_URI = "git://github.com/cherokee/webserver;branch=master;protocol=https \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013 file://cherokee.init \
14 file://cherokee.service \
15 file://cherokee-install-configured.py-once.patch \
16 file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \
17 file://0001-make-Do-not-build-po-files.patch \
Brad Bishop87b3cb82019-11-15 16:35:37 -050018 file://0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019"
20
21S = "${WORKDIR}/git"
22
Andrew Geissler82c905d2020-04-13 13:39:40 -050023inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)}
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024
25PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
26PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
27PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
28PACKAGECONFIG[geoip] = "--with-geoip,--without-geoip,geoip"
29PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
30
31EXTRA_OECONF = "--disable-static \
32 --disable-nls \
33 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
34 --with-wwwroot=${localstatedir}/www/cherokee \
35"
36
Patrick Williams213cb262021-08-07 19:21:33 -050037do_install:append () {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 install -m 0755 -d ${D}${sysconfdir}/init.d
39 install -m 755 ${WORKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee
40
41 # clean up .la files for plugins
42 rm -f ${D}${libdir}/cherokee/*.la
43
44 install -d ${D}${systemd_unitdir}/system
45 install -m 0644 ${WORKDIR}/cherokee.service ${D}${systemd_unitdir}/system
46 rmdir "${D}${localstatedir}/run"
47 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
48}
49
50# Put -dev near the front so we can move the .la files into it with a wildcard
51PACKAGES =+ "libcherokee-server libcherokee-client libcherokee-base cget"
52
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:cget = "${bindir}/cget"
54FILES:libcherokee-server = "${libdir}/libcherokee-server${SOLIBS}"
55FILES:libcherokee-client = "${libdir}/libcherokee-client${SOLIBS}"
56FILES:libcherokee-base = "${libdir}/libcherokee-base${SOLIBS}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050057
58# Pack the htdocs
Patrick Williams213cb262021-08-07 19:21:33 -050059FILES:${PN} += "${localstatedir}/www/cherokee"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050060
Patrick Williams213cb262021-08-07 19:21:33 -050061CONFFILES:${PN} = " \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050062 ${sysconfdir}/cherokee/cherokee.conf \
63 ${sysconfdir}/init.d/cherokee \
64"
65
66INITSCRIPT_NAME = "cherokee"
67INITSCRIPT_PARAMS = "defaults 91 91"
68
Patrick Williams213cb262021-08-07 19:21:33 -050069RPROVIDES:${PN} += "${PN}-systemd"
70RREPLACES:${PN} += "${PN}-systemd"
71RCONFLICTS:${PN} += "${PN}-systemd"
72SYSTEMD_SERVICE:${PN} = "cherokee.service"
Andrew Geissler82c905d2020-04-13 13:39:40 -050073
74python() {
75 if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
76 raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
77}