2 # Copyright (C) 2008-2017 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
12 PKG_RELEASE
:=$(AUTORELEASE
)
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@GNU
/tar
16 PKG_HASH
:=63bebd26879c5e1eea4352f0d03c991f966aeb3ddeb3c7445c902568d5411d28
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
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
33 include $(INCLUDE_DIR
)/package.mk
38 DEPENDS
:=+PACKAGE_TAR_POSIX_ACL
:libacl
+PACKAGE_TAR_XATTR
:libattr
+PACKAGE_TAR_BZIP2
:bzip2
39 EXTRA_DEPENDS
:=$(if
$(CONFIG_PACKAGE_TAR_XZ
),xz
)
41 URL
:=https
://www.gnu.org
/software
/tar/
43 ALTERNATIVES
:=300:/bin
/tar:/usr
/libexec
/tar-gnu
46 define Package
/tar/config
48 config PACKAGE_TAR_POSIX_ACL
49 bool
"tar: Enable POSIX ACL support"
50 default y if USE_FS_ACL_ATTR
53 config PACKAGE_TAR_XATTR
54 bool
"tar: Enable extended attribute (xattr) support"
55 default y if USE_FS_ACL_ATTR
58 config PACKAGE_TAR_BZIP2
59 bool
"tar: Enable seamless bzip2 support"
62 config PACKAGE_TAR_GZIP
63 bool
"tar: Enable seamless gzip support. Needed for sysupgrade."
67 bool
"tar: Enable seamless xz support"
68 select PACKAGE_xz-utils
72 config PACKAGE_TAR_ZSTD
73 bool
"tar: Enable seamless zstd support"
74 select PACKAGE_libzstd
79 define Package
/tar/description
80 Tar is a program for packaging a set of files
as a
81 single archive in
tar format.
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
) \
99 CFLAGS
="$(TARGET_CFLAGS)" \
100 LDFLAGS
="$(TARGET_LDLAGS)"
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
107 $(eval
$(call BuildPackage
,tar))