Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "Fast and Lightweight HTTP Server for Linux" |
| 2 | HOMEPAGE = "http://monkey-project.com" |
| 3 | BUGTRACKER = "https://github.com/monkey/monkey/issues" |
| 4 | |
| 5 | LICENSE = "Apache-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" |
| 7 | |
| 8 | SECTION = "net" |
| 9 | |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 10 | SRC_URI = "http://monkey-project.com/releases/1.6/monkey-${PV}.tar.gz \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 11 | file://0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 12 | file://monkey.service \ |
| 13 | file://monkey.init" |
| 14 | |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 15 | SRC_URI[sha256sum] = "f1122e89cda627123286542b0a18fcaa131cbe9d4f5dd897d9455157289148fb" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 16 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases" |
| 18 | UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz" |
| 19 | |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 20 | EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 21 | -DPID_FILE=/run/monkey.pid \ |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 22 | -DINSTALL_SYSCONFDIR=${sysconfdir}/monkey/ \ |
| 23 | -DWITH_PLUGINS=* \ |
| 24 | -DWITHOUT_PLUGINS=mbedtls \ |
| 25 | -DWITH_DEBUG=1 \ |
| 26 | -DDEFAULT_USER='www-data' \ |
| 27 | -DWITH_SYSTEM_MALLOC=1 \ |
| 28 | " |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 29 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | EXTRA_OECMAKE:append:libc-musl = " -DWITH_MUSL=1 " |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 31 | |
| 32 | # GCC-10+ defaults to -fno-common |
| 33 | CFLAGS += "-fcommon" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 34 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | DISABLE_STATIC = "" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 36 | |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 37 | inherit cmake pkgconfig update-rc.d systemd |
| 38 | |
| 39 | OECMAKE_GENERATOR = "Unix Makefiles" |
| 40 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | do_install:append() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 42 | rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log |
| 43 | rmdir --ignore-fail-on-non-empty ${D}${localstatedir} |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 44 | install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 45 | # Create /var/log/monkey in runtime. |
| 46 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then |
| 47 | install -d ${D}${nonarch_libdir}/tmpfiles.d |
| 48 | echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf |
| 49 | fi |
| 50 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then |
| 51 | install -d ${D}${sysconfdir}/default/volatiles |
| 52 | echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} |
| 53 | fi |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 54 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 55 | install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service |
| 56 | fi |
| 57 | } |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 58 | |
| 59 | INITSCRIPT_NAME = "monkey" |
| 60 | INITSCRIPT_PARAMS = "defaults 70" |
| 61 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | SYSTEMD_SERVICE:${PN} = "monkey.service" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 63 | |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 64 | PACKAGES += "${PN}-plugins" |
| 65 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | FILES:${PN}-plugins = "${libdir}/monkey-*.so" |
Andrew Geissler | bffdb3e | 2020-08-21 16:13:29 -0500 | [diff] [blame] | 67 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 68 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 69 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 70 | CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 71 | ${sysconfdir}/monkey/sites/default \ |
| 72 | ${sysconfdir}/monkey/monkey.mime \ |
| 73 | ${sysconfdir}/monkey/plugins.load \ |
| 74 | ${sysconfdir}/monkey/plugins/proxy_reverse/proxy_reverse.conf \ |
| 75 | ${sysconfdir}/monkey/plugins/mandril/mandril.conf \ |
| 76 | ${sysconfdir}/monkey/plugins/fastcgi/fastcgi.conf \ |
| 77 | ${sysconfdir}/monkey/plugins/logger/logger.conf \ |
| 78 | ${sysconfdir}/monkey/plugins/cgi/cgi.conf \ |
| 79 | ${sysconfdir}/monkey/plugins/cheetah/cheetah.conf \ |
| 80 | ${sysconfdir}/monkey/plugins/dirlisting/dirhtml.conf \ |
| 81 | ${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/header.theme \ |
| 82 | ${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/footer.theme \ |
| 83 | ${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/entry.theme \ |
| 84 | ${sysconfdir}/monkey/plugins/auth/README \ |
| 85 | ${sysconfdir}/monkey/plugins/auth/monkey.users \ |
| 86 | " |
| 87 | |