tcpdump: punt duplicate versioned binary
authorMike Frysinger <vapier@gentoo.org>
Sat, 27 Nov 2010 23:55:20 +0000 (18:55 -0500)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 29 Nov 2010 09:33:47 +0000 (10:33 +0100)
The tcpdump package likes to install two binaries into /usr/sbin --
one named "tcpdump" and one named "tcpdump.<ver>".  But it does this
by installing the file twice rather than using links.  Since the alt
name is useless to us, just punt it.

[Peter: Rework to use POST_INSTALL_TARGET_HOOKS instead]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/tcpdump/tcpdump.mk

diff --git a/CHANGES b/CHANGES
index 87056ed276aa15658f286933c5074153d57d0160..f696164f4f7da84e5833a9320e4fb98345e36106 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,7 +2,7 @@
 
        Fixes all over the tree.
 
-       Updated/fixed packages: qt, xserver-xorg
+       Updated/fixed packages: qt, tcpdump, xserver-xorg
 
        Issues resolved (http://bugs.uclibc.org):
 
index e295e690252604e223d0fe49a1cb5573c7fb45b1..81228169b06904c66e9ec2dc8942055c1a65a796 100644 (file)
@@ -14,4 +14,11 @@ TCPDUMP_CONF_OPT:=--without-crypto \
                $(if $(BR2_PACKAGE_TCPDUMP_SMB),--enable-smb,--disable-smb)
 TCPDUMP_DEPENDENCIES:=zlib libpcap
 
+# make install installs an unneeded extra copy of the tcpdump binary
+define TCPDUMP_REMOVE_DUPLICATED_BINARY
+       rm -f $(TARGET_DIR)/usr/sbin/tcpdump.$(TCPDUMP_VERSION)
+endef
+
+TCPDUMP_POST_INSTALL_TARGET_HOOKS += TCPDUMP_REMOVE_DUPLICATED_BINARY
+
 $(eval $(call AUTOTARGETS,package,tcpdump))