aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Campeanu <tiotags1@gmail.com>2022-08-22 20:20:44 +0300
committerAlexandru Campeanu <tiotags1@gmail.com>2022-08-22 20:20:44 +0300
commit77ee3b850d6821231da9f44003346033ebd5b94a (patch)
tree5ec4af1000fffd697d52a2f4e61b039532929719
parentapp-misc/fastfetch: drop 1.6.4 (diff)
downloadguru-77ee3b85.tar.gz
guru-77ee3b85.tar.bz2
guru-77ee3b85.zip
www-servers/hinsightd: added 0.9.15_p20220822
switched to meson Signed-off-by: Alexandru Campeanu <tiotags1@gmail.com>
-rw-r--r--www-servers/hinsightd/Manifest1
-rw-r--r--www-servers/hinsightd/hinsightd-0.9.15_p20220822.ebuild104
-rw-r--r--www-servers/hinsightd/hinsightd-9999.ebuild31
3 files changed, 126 insertions, 10 deletions
diff --git a/www-servers/hinsightd/Manifest b/www-servers/hinsightd/Manifest
index ff67c26cb..ee98956b4 100644
--- a/www-servers/hinsightd/Manifest
+++ b/www-servers/hinsightd/Manifest
@@ -1 +1,2 @@
+DIST hin9-0c584cbe00c2227d4cb29675e8e2da2c6bd57371.tar.gz 116295 BLAKE2B 69c6a9593fa721e113172696523beb39c63385e8fe319687b2e12c9eb8ff91bb63e45e3c33429026e45522d535c6acb305af1dcc8f120d552dab5fcda3d7734c SHA512 9d66c58545b64c66365c74935be8e3988022b1f3902af5bec7996df86f37bf2fdd54fb913826a0bcf5f9f4ba07e30abc5e6573cf8b4c2f11ec67c1917ed7f000
DIST hin9-af60390e3ade1e617ef76c5ab778934acd76a16e.tar.gz 115019 BLAKE2B a8f15d07dfa7adea3665cc4f8189bb9dc4afa9e9ebd457f78fd0975dad65b4741c1e14b9f701b9bfedafc8d138c96022895b17b9628a8569d60818f46ca791fd SHA512 fb125099500b049e5f371ae1d84b2e07f77b28358d5ad7ff8a655baa86bc77a940a9d9321fbbcd6b1d7ac54e14aa214aeb792ade24cb7140fdb494799686efa8
diff --git a/www-servers/hinsightd/hinsightd-0.9.15_p20220822.ebuild b/www-servers/hinsightd/hinsightd-0.9.15_p20220822.ebuild
new file mode 100644
index 000000000..d5510534f
--- /dev/null
+++ b/www-servers/hinsightd/hinsightd-0.9.15_p20220822.ebuild
@@ -0,0 +1,104 @@
+# 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 meson linux-info
+
+DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
+HOMEPAGE="https://tiotags.gitlab.io/hinsightd"
+LICENSE="BSD"
+SLOT="0"
+
+mycommit="0c584cbe00c2227d4cb29675e8e2da2c6bd57371"
+
+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/meson
+ 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}
+)
+
+pkg_setup() {
+ linux-info_pkg_setup;
+ lua-single_pkg_setup
+}
+
+src_configure() {
+ version=$(ver_cut 1-2 $(lua_get_version))
+ if [ "$version" == "2.1" ]; then
+ version="jit"
+ fi
+ local emesonargs=(
+ $(meson_use ssl openssl)
+ $(meson_use cgi)
+ $(meson_use fcgi)
+ $(meson_use rproxy)
+ $(meson_use ffcall)
+ -Dforce-lua-version=$version
+ )
+ meson_src_configure
+}
+
+src_install() {
+ meson_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
+}
diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild
index 0a2fda199..bb4f22005 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
-inherit fcaps lua-single systemd cmake linux-info
+inherit fcaps lua-single systemd meson linux-info
DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
HOMEPAGE="https://tiotags.gitlab.io/hinsightd"
@@ -31,7 +31,7 @@ IUSE="+ssl cgi +fcgi +rproxy +ffcall"
REQUIRED_USE="${LUA_REQUIRED_USE}"
BDEPEND="
- dev-util/cmake
+ dev-util/meson
virtual/pkgconfig
"
@@ -52,19 +52,30 @@ FILECAPS=(
cap_net_bind_service usr/sbin/${PN}
)
+pkg_setup() {
+ linux-info_pkg_setup;
+ lua-single_pkg_setup
+}
+
src_configure() {
- local mycmakeargs=(
- -DUSE_OPENSSL=$(usex ssl)
- -DUSE_CGI=$(usex cgi)
- -DUSE_FCGI=$(usex fcgi)
- -DUSE_RPROXY=$(usex rproxy)
- -DUSE_FFCALL=$(usex ffcall)
+ version=$(ver_cut 1-2 $(lua_get_version))
+ if [ "$version" == "2.1" ]; then
+ version="jit"
+ fi
+ local emesonargs=(
+ $(meson_use ssl openssl)
+ $(meson_use cgi)
+ $(meson_use fcgi)
+ $(meson_use rproxy)
+ $(meson_use ffcall)
+ -Dforce-lua-version=$version
)
- cmake_src_configure
+ meson_src_configure
}
src_install() {
- cmake_src_install
+ meson_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