[Buildroot] [PATCH 25/25] lua: remove documentation from target
Arnout Vandecappelle (Essensium/Mind)
arnout at mind.be
Thu Feb 23 17:00:47 UTC 2017
Many packages install documentation under /usr/share/lua/.../doc. Add
a TARGET_FINALIZE_HOOK to remove it.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
package/luainterpreter/luainterpreter.mk | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
index a6c98ab992..90382fa78f 100644
--- a/package/luainterpreter/luainterpreter.mk
+++ b/package/luainterpreter/luainterpreter.mk
@@ -6,6 +6,17 @@
LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION))
+# Lua packages often install documentation, clean that up globally
+# Since luainterpreter is a virtual package, we can't use
+# LUAINTERPRETER_TARGET_FINALIZE_HOOKS
+ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER),y)
+define LUAINTERPRETER_REMOVE_DOC
+ rm -rf $(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/doc
+endef
+
+TARGET_FINALIZE_HOOKS += LUAINTERPRETER_REMOVE_DOC
+endif
+
$(eval $(virtual-package))
$(eval $(host-virtual-package))
--
2.11.0
More information about the buildroot
mailing list