2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/gzip
16 PKG_MD5SUM:=e381b8506210c794278f5527cba0e765
20 include $(INCLUDE_DIR)/package.mk
25 TITLE:=gzip (GNU zip) is a compression utility.
26 URL:=http://www.gzip.org/
29 define Package/gzip/description
30 gzip (GNU zip) is a compression utility designed to be a \
31 replacement for compress.
35 gl_cv_func_getopt_gnu=yes \
37 define Package/gzip/install
38 $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
39 $(INSTALL_DIR) $(1)/usr/bin
40 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
43 define Package/gzip/postinst
45 for app in gunzip gzip zcat; do
46 ln -sf $${IPKG_INSTROOT}/usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
50 define Package/gzip/postrm
52 for app in gunzip gzip zcat; do
53 ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
54 $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
59 $(eval $(call BuildPackage,gzip))