[packages] gzip: update to 1.4, correct symlinks on post{inst,rm}
authorStephen Walker <stephendwalker@gmail.com>
Sat, 6 Mar 2010 10:53:30 +0000 (10:53 +0000)
committerStephen Walker <stephendwalker@gmail.com>
Sat, 6 Mar 2010 10:53:30 +0000 (10:53 +0000)
SVN-Revision: 20012

utils/gzip/Makefile

index a788a6e3eb64077d2f518dcdcca507139ffc5765..dc416631bf94fa239fc02734e820eb08d221c8f5 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gzip
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gzip
-PKG_VERSION:=1.3.13
-PKG_RELEASE:=2
+PKG_VERSION:=1.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@GNU/gzip/
-PKG_MD5SUM:=c54a31b93e865f6a4410b2dc64662706
+PKG_SOURCE_URL:=@GNU/gzip
+PKG_MD5SUM:=e381b8506210c794278f5527cba0e765
 
 PKG_INSTALL:=1
 
 
 PKG_INSTALL:=1
 
@@ -22,7 +22,6 @@ include $(INCLUDE_DIR)/package.mk
 define Package/gzip
   SECTION:=utils
   CATEGORY:=Utilities
 define Package/gzip
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=
   TITLE:=gzip (GNU zip) is a compression utility.
   URL:=http://www.gzip.org/
 endef
   TITLE:=gzip (GNU zip) is a compression utility.
   URL:=http://www.gzip.org/
 endef
@@ -38,7 +37,23 @@ CONFIGURE_VARS += \
 define Package/gzip/install
        $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
        $(INSTALL_DIR) $(1)/usr/bin
 define Package/gzip/install
        $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
        $(INSTALL_DIR) $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
+endef
+
+define Package/gzip/postinst
+#!/bin/sh
+for app in gunzip gzip zcat; do
+  ln -sf $${IPKG_INSTROOT}/usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
+done
+endef
+
+define Package/gzip/postrm
+#!/bin/sh
+for app in gunzip gzip zcat; do
+  ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
+  $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
+done
+exit 0
 endef
 
 $(eval $(call BuildPackage,gzip))
 endef
 
 $(eval $(call BuildPackage,gzip))