commit:     ba9fd218cf54c1382520c1d31bebc92b3180c77b
Author:     tiotags <tiotags1 <AT> gmail <DOT> com>
AuthorDate: Fri Sep 10 10:08:03 2021 +0000
Commit:     Alexandru Campeanu <tiotags1 <AT> gmail <DOT> com>
CommitDate: Fri Sep 10 10:08:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ba9fd218

www-servers/hinsightd: added cgi, fcgi and reverse proxy use flags

switched to EAPI8, install executable via cmake install

Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Alexandru Campeanu <tiotags1 <AT> gmail.com>

 www-servers/hinsightd/hinsightd-9999.ebuild | 20 +++++++++++---------
 www-servers/hinsightd/metadata.xml          |  3 +++
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/www-servers/hinsightd/hinsightd-9999.ebuild 
b/www-servers/hinsightd/hinsightd-9999.ebuild
index 1c30b7332..bc9029037 100644
--- a/www-servers/hinsightd/hinsightd-9999.ebuild
+++ b/www-servers/hinsightd/hinsightd-9999.ebuild
@@ -1,7 +1,7 @@
 # Copyright 2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 LUA_COMPAT=( lua5-{1..4} luajit )
 
@@ -13,8 +13,6 @@ LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64"
 
-mycommit="f04d7703f6cdbd2e33f8a7289d80a01dba5e970f"
-
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://gitlab.com/tiotags/hin9.git";
@@ -27,7 +25,7 @@ else
        S="${WORKDIR}/hin9-v${PV}"
 fi
 
-IUSE="+openssl"
+IUSE="+openssl cgi +fcgi +rproxy"
 REQUIRED_USE="${LUA_REQUIRED_USE}"
 
 BDEPEND="
@@ -51,16 +49,22 @@ PATCHES=(
        "${FILESDIR}/${PN}-defines-v4.patch"
 )
 
+FILECAPS=(
+       cap_net_bind_service usr/sbin/${PN}
+)
+
 src_configure() {
        local mycmakeargs=(
                -DUSE_OPENSSL=$(usex openssl)
+               -DUSE_CGI=$(usex cgi)
+               -DUSE_FCGI=$(usex fcgi)
+               -DUSE_RPROXY=$(usex rproxy)
        )
        cmake_src_configure
 }
 
 src_install() {
-       newsbin "${BUILD_DIR}/hin9" $PN
-       newbin "${BUILD_DIR}/hin9_pid_helper" ${PN}_pid_helper
+       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
@@ -74,12 +78,10 @@ src_install() {
        # logrotate
        insinto /etc/logrotate.d
        newins "${S}/external/packaging/$PN.logrotate.sh" $PN
-
-       keepdir /var/www/localhost
 }
 
 pkg_postinst() {
-       fcaps CAP_NET_BIND_SERVICE /usr/sbin/$PN
+       fcaps_pkg_postinst
 
        if kernel_is lt 5 7; then
                ewarn ""

diff --git a/www-servers/hinsightd/metadata.xml 
b/www-servers/hinsightd/metadata.xml
index 826bd5d5f..34968a7e2 100644
--- a/www-servers/hinsightd/metadata.xml
+++ b/www-servers/hinsightd/metadata.xml
@@ -18,5 +18,8 @@
        </longdescription>
        <use>
                <flag name="openssl">Enable tls encryption with openssl</flag>
+               <flag name="cgi">Enable old/slow cgi support (legacy should not 
be used)</flag>
+               <flag name="fcgi">Enable fast cgi support</flag>
+               <flag name="rproxy">Enable reverse proxying support</flag>
        </use>
 </pkgmetadata>

Reply via email to