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.

64 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2008-2015 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:=tar
  9. PKG_VERSION:=1.28
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
  13. PKG_MD5SUM:=8f32b2bc1ed7ddf4cf4e4a39711341b0
  14. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
  15. PKG_LICENSE:=GPL-3.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/tar
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. DEPENDS:=+bzip2 +libacl +libattr
  23. TITLE:=GNU tar
  24. URL:=http://www.gnu.org/software/tar/
  25. endef
  26. define Package/tar/description
  27. Tar is a program for packaging a set of files as a
  28. single archive in tar format.
  29. endef
  30. define Package/tar/postinst
  31. #!/bin/sh
  32. if [ -e $${IPKG_INSTROOT}/bin/tar ]; then
  33. rm -r $${IPKG_INSTROOT}/bin/tar;
  34. fi
  35. ln -sf /usr/bin/tar $${IPKG_INSTROOT}/bin/tar
  36. endef
  37. define Package/tar/postrm
  38. #!/bin/sh
  39. rm $${IPKG_INSTROOT}/bin/tar
  40. ln -s busybox $${IPKG_INSTROOT}/bin/tar
  41. $${IPKG_INSTROOT}/bin/tar 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/tar
  42. exit 0
  43. endef
  44. MAKE_FLAGS += \
  45. CFLAGS="$(TARGET_CFLAGS)" \
  46. LDFLAGS="$(TARGET_LDLAGS)"
  47. define Package/tar/install
  48. $(INSTALL_DIR) $(1)/usr/bin/
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
  50. endef
  51. $(eval $(call BuildPackage,tar))