blob: d3e22757c41cedb1034f91fbf2a4fb8a6ad23e81 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "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
Patrick Williams7784c422022-11-17 07:29:11 -060010SRC_URI = "git://github.com/monkey/monkey;branch=1.6;protocol=https \
Patrick Williams92b42cb2022-09-03 06:53:57 -050011 file://0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050012 file://monkey.service \
13 file://monkey.init"
14
Patrick Williams7784c422022-11-17 07:29:11 -060015SRCREV = "7999b487fded645381d387ec0e057e92407b0d2c"
16S = "${WORKDIR}/git"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050017
Brad Bishop316dfdd2018-06-25 12:45:53 -040018UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases"
19UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
20
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050021EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \
Andrew Geissler595f6302022-01-24 19:11:47 +000022 -DPID_FILE=/run/monkey.pid \
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050023 -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 "
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030
Patrick Williams213cb262021-08-07 19:21:33 -050031EXTRA_OECMAKE:append:libc-musl = " -DWITH_MUSL=1 "
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050032
33# GCC-10+ defaults to -fno-common
34CFLAGS += "-fcommon"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035
Patrick Williamsb48b7b42016-08-17 15:04:38 -050036DISABLE_STATIC = ""
Patrick Williamsb48b7b42016-08-17 15:04:38 -050037
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050038inherit cmake pkgconfig update-rc.d systemd
39
40OECMAKE_GENERATOR = "Unix Makefiles"
41
Patrick Williams213cb262021-08-07 19:21:33 -050042do_install:append() {
Andrew Geissler595f6302022-01-24 19:11:47 +000043 rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log
44 rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050045 install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
Andrew Geissler595f6302022-01-24 19:11:47 +000046 # Create /var/log/monkey in runtime.
47 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
48 install -d ${D}${nonarch_libdir}/tmpfiles.d
49 echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
50 fi
51 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
52 install -d ${D}${sysconfdir}/default/volatiles
53 echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
54 fi
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050055 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
56 install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service
57 fi
58}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050059
60INITSCRIPT_NAME = "monkey"
61INITSCRIPT_PARAMS = "defaults 70"
62
Patrick Williams213cb262021-08-07 19:21:33 -050063SYSTEMD_SERVICE:${PN} = "monkey.service"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050064
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050065PACKAGES += "${PN}-plugins"
66
Patrick Williams213cb262021-08-07 19:21:33 -050067FILES:${PN}-plugins = "${libdir}/monkey-*.so"
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050068
Andrew Geissler595f6302022-01-24 19:11:47 +000069FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050070
Patrick Williams213cb262021-08-07 19:21:33 -050071CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050072 ${sysconfdir}/monkey/sites/default \
73 ${sysconfdir}/monkey/monkey.mime \
74 ${sysconfdir}/monkey/plugins.load \
75 ${sysconfdir}/monkey/plugins/proxy_reverse/proxy_reverse.conf \
76 ${sysconfdir}/monkey/plugins/mandril/mandril.conf \
77 ${sysconfdir}/monkey/plugins/fastcgi/fastcgi.conf \
78 ${sysconfdir}/monkey/plugins/logger/logger.conf \
79 ${sysconfdir}/monkey/plugins/cgi/cgi.conf \
80 ${sysconfdir}/monkey/plugins/cheetah/cheetah.conf \
81 ${sysconfdir}/monkey/plugins/dirlisting/dirhtml.conf \
82 ${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/header.theme \
83 ${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/footer.theme \
84 ${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/entry.theme \
85 ${sysconfdir}/monkey/plugins/auth/README \
86 ${sysconfdir}/monkey/plugins/auth/monkey.users \
87 "
88