summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-09-01 17:23:36 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-09-12 19:24:59 +0200
commit26d0bb8b11ecef1273a2cc95f0197f65dc7b3a62 (patch)
treeef91f0c3984e480e8fe42c0c58ad6a527a1e17e3
parentc692a3e44348b70153210733bd7d0c82028f8973 (diff)
libidn: convert old-style hooks to new-style hooks
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/libidn/libidn.mk20
1 files changed, 13 insertions, 7 deletions
diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk
index 79e03211d..1627c96ec 100644
--- a/package/libidn/libidn.mk
+++ b/package/libidn/libidn.mk
@@ -13,17 +13,23 @@ LIBIDN_CONF_OPT = --enable-shared --disable-java --enable-csharp=no
LIBIDN_LIBTOOL_PATCH = NO
LIBIDN_DEPENDENCIES = host-pkg-config $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv)
-$(eval $(call AUTOTARGETS,package,libidn))
+define LIBIDN_REMOVE_BINARY
+ rm -f $(TARGET_DIR)/usr/bin/idn
+endef
-$(LIBIDN_HOOK_POST_INSTALL):
ifneq ($(BR2_PACKAGE_LIBIDN_BINARY),y)
- rm -f $(TARGET_DIR)/usr/bin/idn
+LIBIDN_POST_INSTALL_TARGET_HOOKS += LIBIDN_REMOVE_BINARY
endif
+
+define LIBIDN_REMOVE_EMACS_STUFF
rm -rf $(TARGET_DIR)/usr/share/emacs
- touch $@
+endef
-$(LIBIDN_TARGET_UNINSTALL):
- $(call MESSAGE,"Uninstalling")
+LIBIDN_POST_INSTALL_TARGET_HOOKS += LIBIDN_REMOVE_EMACS_STUFF
+
+define LIBIDN_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/lib/libidn*
rm -f $(TARGET_DIR)/usr/bin/idn
- rm -f $(LIBIDN_TARGET_INSTALL_TARGET) $(LIBIDN_HOOK_POST_INSTALL)
+endef
+
+$(eval $(call AUTOTARGETS,package,libidn))