summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2021-01-07 16:31:23 +0100
committerFabian Groffen <grobian@gentoo.org>2021-01-07 16:31:28 +0100
commit280c4f83d84818e3ba4391b1c7f69f8711870e39 (patch)
tree0646996280735dda5ab67cad9349e26f3d7c7b70
parentwww-apps/baikal: cleanup old (diff)
downloadgentoo-280c4f83.tar.gz
gentoo-280c4f83.tar.bz2
gentoo-280c4f83.zip
www-apps/baikal: use relative symlink to config
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--www-apps/baikal/baikal-0.7.2.ebuild22
1 files changed, 13 insertions, 9 deletions
diff --git a/www-apps/baikal/baikal-0.7.2.ebuild b/www-apps/baikal/baikal-0.7.2.ebuild
index 39d0aca079d3..373282d259b3 100644
--- a/www-apps/baikal/baikal-0.7.2.ebuild
+++ b/www-apps/baikal/baikal-0.7.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -34,15 +34,19 @@ src_install() {
einfo "Setting up container for configuration"
dodir /etc/${PN}
- einfo "Fixing symlinks"
- local link target
- find "${D}${MY_HTDOCSDIR}" -type l | while read link ; do
- target=$(readlink "${link}")
- target=${target/..\/Core/Core}
- rm "${link}" && ln -s "${target}" "${link}"
+ # setup config in /etc
+ # we are not allowed to use straight-forward absolute symlink :(
+ local root path htdocsdir=${MY_HTDOCSDIR%/}
+ while [[ -n ${htdocsdir} ]] ; do
+ root+="../"
+ htdocsdir=${htdocsdir%/*}
+ # trim duplicate slashes
+ while [[ ${htdocsdir} == */ ]] ; do
+ htdocsdir=${htdocsdir%/}
+ done
done
- dosym /etc/${PN} "${MY_HTDOCSDIR}"/Specific
- dosym /etc/${PN} "${MY_HTDOCSDIR}"/config
+ dosym ${root%/}/etc/${PN} "${MY_HTDOCSDIR}"/Specific
+ dosym ${root%/}/etc/${PN} "${MY_HTDOCSDIR}"/config
dosym . "${MY_HTDOCSDIR}"/html
webapp_postinst_txt en "${FILESDIR}/postinstall-v0.7-en.txt"