lua: remove documentation from target
authorArnout Vandecappelle <arnout@mind.be>
Thu, 23 Feb 2017 17:00:47 +0000 (18:00 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 5 Mar 2017 21:03:55 +0000 (22:03 +0100)
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@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/luainterpreter/luainterpreter.mk

index a6c98ab99286e59ba4d86e2651620dda59278d83..90382fa78f263666432e40507f178eddbbf4cfb0 100644 (file)
@@ -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))