summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-08-16 21:57:35 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2024-08-21 23:07:42 +0200
commit29cc21181dae3785c480bf7469670877eff6c0d5 (patch)
tree99e25410695cd7560e39e6f72c3c8c1a27c93266 /eclass
parentecm.eclass: Add ECM_HANDBOOK="forceoff" (diff)
downloadgentoo-29cc21181dae3785c480bf7469670877eff6c0d5.tar.gz
gentoo-29cc21181dae3785c480bf7469670877eff6c0d5.tar.bz2
gentoo-29cc21181dae3785c480bf7469670877eff6c0d5.zip
ecm.eclass: Add ECM_REMOVE_FROM_INSTALL for install image file removal
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ecm.eclass15
1 files changed, 14 insertions, 1 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index a7e4b24fa585..fbe1a23cf205 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -122,6 +122,15 @@ if [[ ${CATEGORY} = kde-frameworks ]]; then
fi
: "${ECM_QTHELP:=false}"
+# @ECLASS_VARIABLE: ECM_REMOVE_FROM_INSTALL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array of <paths> to remove from install image.
+if [[ ${ECM_REMOVE_FROM_INSTALL} ]]; then
+ [[ ${ECM_REMOVE_FROM_INSTALL@a} == *a* ]] ||
+ die "ECM_REMOVE_FROM_INSTALL must be an array"
+fi
+
# @ECLASS_VARIABLE: ECM_TEST
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -679,9 +688,9 @@ ecm_src_install() {
cmake_src_install
+ local f
# bug 621970
if [[ -d "${ED}"/usr/share/applications ]]; then
- local f
for f in "${ED}"/usr/share/applications/*.desktop; do
if [[ -x ${f} ]]; then
einfo "Removing executable bit from ${f#${ED}}"
@@ -716,6 +725,10 @@ ecm_src_install() {
popd > /dev/null || die
fi
fi
+
+ for f in "${ECM_REMOVE_FROM_INSTALL[@]}"; do
+ rm -r "${ED}"${f} || die
+ done
}
# @FUNCTION: ecm_pkg_preinst