X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=utils%2Fgzip%2FMakefile;h=dc416631bf94fa239fc02734e820eb08d221c8f5;hp=cf9cf88cff92c2b4b043970f6bafd8523d2c9561;hb=77ac3ace053f29d4ce82b32bdf412e8582d667d9;hpb=e020bf31f06d326aef5bf57973654117dde901c7 diff --git a/utils/gzip/Makefile b/utils/gzip/Makefile index cf9cf88cff..dc416631bf 100644 --- a/utils/gzip/Makefile +++ b/utils/gzip/Makefile @@ -1,5 +1,5 @@ -# -# Copyright (C) 2006-2009 OpenWrt.org +# +# Copyright (C) 2006-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gzip -PKG_VERSION:=1.3.13 +PKG_VERSION:=1.4 PKG_RELEASE:=1 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 include $(INCLUDE_DIR)/package.mk define Package/gzip SECTION:=utils CATEGORY:=Utilities - DEPENDS:= TITLE:=gzip (GNU zip) is a compression utility. URL:=http://www.gzip.org/ endef @@ -33,16 +34,26 @@ endef CONFIGURE_VARS += \ gl_cv_func_getopt_gnu=yes \ -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install +define Package/gzip/install $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat} + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/ endef -define Package/gzip/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/ +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))