diff options
Diffstat (limited to 'www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild')
-rw-r--r-- | www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild b/www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild new file mode 100644 index 000000000..9b3b7b355 --- /dev/null +++ b/www-servers/hinsightd/hinsightd-0.9.15_p20220817.ebuild @@ -0,0 +1,93 @@ +# Copyright 2021-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} luajit ) + +inherit fcaps lua-single systemd cmake linux-info + +DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals" +HOMEPAGE="https://tiotags.gitlab.io/hinsightd" +LICENSE="BSD" +SLOT="0" + +mycommit="af60390e3ade1e617ef76c5ab778934acd76a16e" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git" +elif [[ ! -z "$mycommit" ]]; then + SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/${mycommit}/hin9-${mycommit}.tar.gz" + S="${WORKDIR}/hin9-${mycommit}" +else + SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/v${PV}/hin9-v${PV}.tar.gz" + S="${WORKDIR}/hin9-v${PV}" +fi + +if [[ ${PV} != *9999* ]]; then + KEYWORDS="~amd64" +fi + +IUSE="+ssl cgi +fcgi +rproxy +ffcall" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +BDEPEND=" + dev-util/cmake + virtual/pkgconfig +" + +RDEPEND=" + ${LUA_DEPS} + acct-user/hinsightd + acct-group/hinsightd + sys-libs/liburing + sys-libs/zlib + virtual/libcrypt + ssl? ( dev-libs/openssl ) + ffcall? ( dev-libs/ffcall ) +" + +DEPEND="${RDEPEND}" + +FILECAPS=( + cap_net_bind_service usr/sbin/${PN} +) + +src_configure() { + local mycmakeargs=( + -DUSE_OPENSSL=$(usex ssl) + -DUSE_CGI=$(usex cgi) + -DUSE_FCGI=$(usex fcgi) + -DUSE_RPROXY=$(usex rproxy) + -DUSE_FFCALL=$(usex ffcall) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + newinitd "${S}/external/packaging/$PN.initd.sh" $PN + newconfd "${S}/external/packaging/$PN.confd.sh" $PN + systemd_dounit "${FILESDIR}/$PN.service" # not tested + + # config + insinto /etc/$PN + doins "${S}/workdir/main.lua" + doins "${S}/workdir/lib.lua" + doins -r "${S}/workdir/config/" + + # logrotate + insinto /etc/logrotate.d + newins "${S}/external/packaging/$PN.logrotate.sh" $PN +} + +pkg_postinst() { + fcaps_pkg_postinst + + if kernel_is lt 5 7; then + ewarn "" + ewarn "hinsightd requires io_uring and kernel ~5.6.0" + ewarn "" + fi +} |