blob: 8ae886a3944beac49aa953096c13fe7e391d37aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
LUA_COMPAT=( lua5-{1..4} )
inherit git-r3 fcaps lua-single systemd
DESCRIPTION="hinsightd a http/1.1 webserver with (hopefully) minimal goals"
HOMEPAGE="https://gitlab.com/tiotags/hin9"
EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git"
LICENSE="BSD"
SLOT="0"
KEYWORDS=""
IUSE="" #+openssl
REQUIRED_USE="${LUA_REQUIRED_USE}"
BDEPEND="
dev-util/ninja
virtual/pkgconfig
"
RDEPEND="
${LUA_DEPS}
acct-user/hinsightd
acct-group/hinsightd
sys-libs/liburing
sys-libs/zlib
dev-libs/openssl
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/hinsightd-redefine-directories.patch"
)
#src_configure() {
#}
src_compile() {
cd build
ninja || die
}
src_install() {
newbin "${S}/build/hin9" hinsightd
newinitd "${FILESDIR}/init.d.sh" hinsightd
systemd_dounit "${FILESDIR}/hinsightd.service" # not tested
insinto /etc/hinsightd
newins "${S}/workdir/main.lua" hinsightd.lua
# logrotate
insinto /etc/logrotate.d
newins "${FILESDIR}"/logrotate.d.sh hinsightd
keepdir /var/www/localhost/htdocs
keepdir /var/log/hinsightd
keepdir /var/tmp/hinsightd
}
pkg_postinst() {
fcaps CAP_NET_BIND_SERVICE /usr/bin/hinsightd
}
|