commit:     9b5a49c2ec6dd811c6df62eda41cef470e119854
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Wed Apr  9 16:03:43 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 11 00:47:11 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b5a49c2

net-analyzer/ntopng: replace symlink with real file

otherwise a broken symlink is installed because doc is not installed:

$ ls -l /usr/share/ntopng/httpdocs/geoip/README.geolocation.md
README.geolocation.md -> ../../doc/README.geolocation.md

Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41534
Closes: https://github.com/gentoo/gentoo/pull/41534
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/ntopng/ntopng-5.6-r2.ebuild | 9 ++++++++-
 net-analyzer/ntopng/ntopng-6.0.ebuild    | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/net-analyzer/ntopng/ntopng-5.6-r2.ebuild 
b/net-analyzer/ntopng/ntopng-5.6-r2.ebuild
index f0d95a98fcd5..6733b33740b3 100644
--- a/net-analyzer/ntopng/ntopng-5.6-r2.ebuild
+++ b/net-analyzer/ntopng/ntopng-5.6-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -76,6 +76,13 @@ src_compile() {
 }
 
 src_install() {
+       # httpdocs/geoip/README.geolocation.md is a symlink, change to real file
+       GEOLOCATION_MD="httpdocs/geoip/README.geolocation.md"
+       if [[ -h "${GEOLOCATION_MD}" ]] ; then
+               GEOLOCATION_MD_REAL=$(readlink -m -- "${GEOLOCATION_MD}" || die)
+               ln -f ${GEOLOCATION_MD_REAL} ${GEOLOCATION_MD} || die
+       fi
+
        SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
        insinto "${SHARE_NTOPNG_DIR}"
        doins -r httpdocs

diff --git a/net-analyzer/ntopng/ntopng-6.0.ebuild 
b/net-analyzer/ntopng/ntopng-6.0.ebuild
index 1a56defdbdc9..d69646f710bf 100644
--- a/net-analyzer/ntopng/ntopng-6.0.ebuild
+++ b/net-analyzer/ntopng/ntopng-6.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -76,6 +76,13 @@ src_compile() {
 }
 
 src_install() {
+       # httpdocs/geoip/README.geolocation.md is a symlink, change to real file
+       GEOLOCATION_MD="httpdocs/geoip/README.geolocation.md"
+       if [[ -h "${GEOLOCATION_MD}" ]] ; then
+               GEOLOCATION_MD_REAL=$(readlink -m -- "${GEOLOCATION_MD}" || die)
+               ln -f ${GEOLOCATION_MD_REAL} ${GEOLOCATION_MD} || die
+       fi
+
        SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
        insinto "${SHARE_NTOPNG_DIR}"
        doins -r httpdocs

Reply via email to