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