You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gzip
  9. PKG_VERSION:=1.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/gzip
  13. PKG_MD5SUM:=c4abae2ddd5c6f39c6f8169693cc7ac0
  14. PKG_LICENSE:=GPL-3.0+
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/gzip
  18. SECTION:=utils
  19. CATEGORY:=Utilities
  20. TITLE:=gzip (GNU zip) is a compression utility.
  21. URL:=https://www.gnu.org/software/gzip/
  22. MAINTAINER:=Christian Beier <dontmind@freeshell.org>
  23. endef
  24. define Package/gzip/description
  25. gzip (GNU zip) is a compression utility designed to be a \
  26. replacement for compress.
  27. endef
  28. CONFIGURE_VARS += \
  29. gl_cv_func_getopt_gnu=yes \
  30. ac_cv_search_clock_gettime=no
  31. define Package/gzip/install
  32. $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
  33. $(INSTALL_DIR) $(1)/usr/bin
  34. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
  35. endef
  36. define Package/gzip/postinst
  37. #!/bin/sh
  38. for app in gunzip gzip zcat; do
  39. ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
  40. done
  41. endef
  42. define Package/gzip/postrm
  43. #!/bin/sh
  44. for app in gunzip gzip zcat; do
  45. ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
  46. $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
  47. done
  48. exit 0
  49. endef
  50. $(eval $(call BuildPackage,gzip))