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.

65 lines
1.5 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.10
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gzip
  13. PKG_HASH:=8425ccac99872d544d4310305f915f5ea81e04d0f437ef1a230dc9d1c819d7c0
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/gzip
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. SUBMENU:=Compression
  22. TITLE:=gzip (GNU zip) is a compression utility.
  23. URL:=https://www.gnu.org/software/gzip/
  24. MAINTAINER:=Christian Beier <dontmind@freeshell.org>
  25. endef
  26. define Package/gzip/description
  27. gzip (GNU zip) is a compression utility designed to be a \
  28. replacement for compress.
  29. endef
  30. CONFIGURE_VARS += \
  31. gl_cv_func_getopt_gnu=yes \
  32. ac_cv_search_clock_gettime=no
  33. define Package/gzip/install
  34. $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
  35. $(INSTALL_DIR) $(1)/usr/bin
  36. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
  37. endef
  38. define Package/gzip/postinst
  39. #!/bin/sh
  40. for app in gunzip gzip zcat; do
  41. ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
  42. done
  43. endef
  44. define Package/gzip/postrm
  45. #!/bin/sh
  46. for app in gunzip gzip zcat; do
  47. ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
  48. $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
  49. done
  50. exit 0
  51. endef
  52. $(eval $(call BuildPackage,gzip))