mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-11 08:03:16 -04:00
Add := to virtual/zlib deps, part 1 Done via: ``` git grep -l virtual/zlib$ | xargs sed -i -e 's@virtual/zlib$@&:=@' ``` Add := to virtual/zlib deps Done via: ``` git grep -l 'virtual/zlib ' | xargs sed -i -e 's@virtual/zlib @virtual/zlib:= @g' ``` Unify virtual/zlib:0= to virtual/zlib:= Done via: ``` git grep -l 'virtual/zlib:0=' | xargs sed -i -e 's@virtual/zlib:0=@virtual/zlib:=@g' ``` Add := to virtual/zlib deps, part 3 Done via: ``` git grep -l 'virtual/zlib:0' | xargs sed -i -e 's@virtual/zlib:0@virtual/zlib:=@g' git grep -l 'virtual/zlib:=/' | xargs sed -i -e 's@virtual/zlib:=/@virtual/zlib:0/@g' ``` Add := to virtual/zlib deps, part 4 Done via: ``` git grep -l 'virtual/zlib\[' | xargs sed -i -e 's@virtual/zlib\[@virtual/zlib:=\[@g' ``` Use := on virtual/zlib deps, part 5 Done via: ``` git grep -l 'virtual/zlib-' | xargs sed -i -r -e 's@virtual/zlib-[0-9.]*(-r[0-9]*)?@&:=@g' git grep -l 'virtual/zlib-' | xargs sed -i -e 's@:=:=@:=@g' pkgcheck scan --commits \ -c SourcingCheck,VisibilityCheck,DependencyCheck --exit error ``` Use := on virtual/zlib deps, part 6 Done via: ``` git grep -l 'virtual/zlib"' | xargs sed -i -e 's@virtual/zlib"@virtual/zlib:="@' ``` Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
103 lines
2.1 KiB
Bash
103 lines
2.1 KiB
Bash
# Copyright 2021-2025 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"
|
|
|
|
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.bz2"
|
|
S="${WORKDIR}/hin9-${mycommit}"
|
|
else
|
|
SRC_URI="https://gitlab.com/tiotags/hin9/-/archive/v${PV}/hin9-v${PV}.tar.bz2"
|
|
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-build/meson
|
|
virtual/pkgconfig
|
|
"
|
|
|
|
RDEPEND="
|
|
${LUA_DEPS}
|
|
acct-user/hinsightd
|
|
acct-group/hinsightd
|
|
sys-libs/liburing
|
|
virtual/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
|
|
}
|