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.

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