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.

100 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2008-2017 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.32
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/tar
  13. PKG_HASH:=d0d3ae07f103323be809bc3eac0dcc386d52c5262499fe05511ac4788af1fdd8
  14. PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:gnu:tar
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/tar
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. DEPENDS:=+PACKAGE_TAR_POSIX_ACL:libacl +PACKAGE_TAR_XATTR:libattr +PACKAGE_TAR_BZIP2:bzip2
  25. EXTRA_DEPENDS:=$(if $(CONFIG_PACKAGE_TAR_XZ),xz)
  26. TITLE:=GNU tar
  27. URL:=https://www.gnu.org/software/tar/
  28. MENU:=1
  29. ALTERNATIVES:=300:/bin/tar:/usr/libexec/tar-gnu
  30. endef
  31. define Package/tar/config
  32. if PACKAGE_tar
  33. config PACKAGE_TAR_POSIX_ACL
  34. bool "tar: Enable POSIX ACL support"
  35. default y if USE_FS_ACL_ATTR
  36. default n
  37. config PACKAGE_TAR_XATTR
  38. bool "tar: Enable extended attribute (xattr) support"
  39. default y if USE_FS_ACL_ATTR
  40. default n
  41. config PACKAGE_TAR_BZIP2
  42. bool "tar: Enable seamless bzip2 support"
  43. default y
  44. config PACKAGE_TAR_GZIP
  45. bool "tar: Enable seamless gzip support"
  46. default y
  47. config PACKAGE_TAR_XZ
  48. bool "tar: Enable seamless xz support"
  49. select PACKAGE_xz-utils
  50. select PACKAGE_xz
  51. default y
  52. config PACKAGE_TAR_ZSTD
  53. bool "tar: Enable seamless zstd support"
  54. select PACKAGE_libzstd
  55. default y
  56. endif
  57. endef
  58. define Package/tar/description
  59. Tar is a program for packaging a set of files as a
  60. single archive in tar format.
  61. endef
  62. CONFIGURE_ARGS += \
  63. $(if $(CONFIG_PACKAGE_TAR_POSIX_ACL),--with,--without)-posix-acls \
  64. $(if $(CONFIG_PACKAGE_TAR_XATTR),--with,--without)-xattrs \
  65. $(if $(CONFIG_PACKAGE_TAR_BZIP2),--with-bzip2=bzip2,--without-bzip2) \
  66. $(if $(CONFIG_PACKAGE_TAR_GZIP),--with-gzip=gzip,--without-gzip) \
  67. $(if $(CONFIG_PACKAGE_TAR_XZ),--with-xz=xz,--without-xz) \
  68. $(if $(CONFIG_PACKAGE_TAR_ZSTD),--with-zstd=zstd,--without-zstd) \
  69. --without-compress \
  70. --without-lzip \
  71. --without-lzma \
  72. --without-lzop \
  73. --without-selinux \
  74. --disable-rpath
  75. MAKE_FLAGS += \
  76. CFLAGS="$(TARGET_CFLAGS)" \
  77. LDFLAGS="$(TARGET_LDLAGS)"
  78. define Package/tar/install
  79. $(INSTALL_DIR) $(1)/usr/libexec
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tar $(1)/usr/libexec/tar-gnu
  81. endef
  82. $(eval $(call BuildPackage,tar))