1 |
commit: ba9fd218cf54c1382520c1d31bebc92b3180c77b |
2 |
Author: tiotags <tiotags1 <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Sep 10 10:08:03 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 10 10:08:03 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ba9fd218 |
7 |
|
8 |
www-servers/hinsightd: added cgi, fcgi and reverse proxy use flags |
9 |
|
10 |
switched to EAPI8, install executable via cmake install |
11 |
|
12 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
13 |
Signed-off-by: Alexandru Campeanu <tiotags1 <AT> gmail.com> |
14 |
|
15 |
www-servers/hinsightd/hinsightd-9999.ebuild | 20 +++++++++++--------- |
16 |
www-servers/hinsightd/metadata.xml | 3 +++ |
17 |
2 files changed, 14 insertions(+), 9 deletions(-) |
18 |
|
19 |
diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild b/www-servers/hinsightd/hinsightd-9999.ebuild |
20 |
index 1c30b7332..bc9029037 100644 |
21 |
--- a/www-servers/hinsightd/hinsightd-9999.ebuild |
22 |
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild |
23 |
@@ -1,7 +1,7 @@ |
24 |
# Copyright 2021 Gentoo Authors |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
-EAPI=7 |
28 |
+EAPI=8 |
29 |
|
30 |
LUA_COMPAT=( lua5-{1..4} luajit ) |
31 |
|
32 |
@@ -13,8 +13,6 @@ LICENSE="BSD" |
33 |
SLOT="0" |
34 |
KEYWORDS="~amd64" |
35 |
|
36 |
-mycommit="f04d7703f6cdbd2e33f8a7289d80a01dba5e970f" |
37 |
- |
38 |
if [[ ${PV} == *9999* ]]; then |
39 |
inherit git-r3 |
40 |
EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git" |
41 |
@@ -27,7 +25,7 @@ else |
42 |
S="${WORKDIR}/hin9-v${PV}" |
43 |
fi |
44 |
|
45 |
-IUSE="+openssl" |
46 |
+IUSE="+openssl cgi +fcgi +rproxy" |
47 |
REQUIRED_USE="${LUA_REQUIRED_USE}" |
48 |
|
49 |
BDEPEND=" |
50 |
@@ -51,16 +49,22 @@ PATCHES=( |
51 |
"${FILESDIR}/${PN}-defines-v4.patch" |
52 |
) |
53 |
|
54 |
+FILECAPS=( |
55 |
+ cap_net_bind_service usr/sbin/${PN} |
56 |
+) |
57 |
+ |
58 |
src_configure() { |
59 |
local mycmakeargs=( |
60 |
-DUSE_OPENSSL=$(usex openssl) |
61 |
+ -DUSE_CGI=$(usex cgi) |
62 |
+ -DUSE_FCGI=$(usex fcgi) |
63 |
+ -DUSE_RPROXY=$(usex rproxy) |
64 |
) |
65 |
cmake_src_configure |
66 |
} |
67 |
|
68 |
src_install() { |
69 |
- newsbin "${BUILD_DIR}/hin9" $PN |
70 |
- newbin "${BUILD_DIR}/hin9_pid_helper" ${PN}_pid_helper |
71 |
+ cmake_src_install |
72 |
newinitd "${S}/external/packaging/$PN.initd.sh" $PN |
73 |
newconfd "${S}/external/packaging/$PN.confd.sh" $PN |
74 |
systemd_dounit "${FILESDIR}/$PN.service" # not tested |
75 |
@@ -74,12 +78,10 @@ src_install() { |
76 |
# logrotate |
77 |
insinto /etc/logrotate.d |
78 |
newins "${S}/external/packaging/$PN.logrotate.sh" $PN |
79 |
- |
80 |
- keepdir /var/www/localhost |
81 |
} |
82 |
|
83 |
pkg_postinst() { |
84 |
- fcaps CAP_NET_BIND_SERVICE /usr/sbin/$PN |
85 |
+ fcaps_pkg_postinst |
86 |
|
87 |
if kernel_is lt 5 7; then |
88 |
ewarn "" |
89 |
|
90 |
diff --git a/www-servers/hinsightd/metadata.xml b/www-servers/hinsightd/metadata.xml |
91 |
index 826bd5d5f..34968a7e2 100644 |
92 |
--- a/www-servers/hinsightd/metadata.xml |
93 |
+++ b/www-servers/hinsightd/metadata.xml |
94 |
@@ -18,5 +18,8 @@ |
95 |
</longdescription> |
96 |
<use> |
97 |
<flag name="openssl">Enable tls encryption with openssl</flag> |
98 |
+ <flag name="cgi">Enable old/slow cgi support (legacy should not be used)</flag> |
99 |
+ <flag name="fcgi">Enable fast cgi support</flag> |
100 |
+ <flag name="rproxy">Enable reverse proxying support</flag> |
101 |
</use> |
102 |
</pkgmetadata> |