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