packages/utils/gzip/Makefile
swalker 56eb3b309a [packages] gzip: add rsyncable support
git-svn-id: svn://svn.openwrt.org/openwrt/packages@30620 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-02-17 20:31:05 +00:00

61 lines
1.3 KiB
Makefile

#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gzip
PKG_VERSION:=1.4
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gzip
PKG_MD5SUM:=e381b8506210c794278f5527cba0e765
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/gzip
SECTION:=utils
CATEGORY:=Utilities
TITLE:=gzip (GNU zip) is a compression utility.
URL:=http://www.gzip.org/
endef
define Package/gzip/description
gzip (GNU zip) is a compression utility designed to be a \
replacement for compress.
endef
CONFIGURE_VARS += \
gl_cv_func_getopt_gnu=yes \
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/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))