1
0

Makefile 1.5 KB

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