2 # Copyright (C) 2008-2016 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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@GNU
/$(PKG_NAME
)
16 PKG_HASH
:=236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2
17 PKG_MAINTAINER
:=Álvaro Fernández Rojas
<noltari@gmail.com
>
20 PKG_LICENSE_FILES
:=COPYING
26 include $(INCLUDE_DIR
)/package.mk
31 DEPENDS
:=+PACKAGE_TAR_POSIX_ACL
:libacl
+PACKAGE_TAR_XATTR
:libattr
+PACKAGE_TAR_BZIP2
:bzip2
32 EXTRA_DEPENDS
:=$(if
$(CONFIG_PACKAGE_TAR_XZ
),xz
)
34 URL
:=http
://www.gnu.org
/software
/tar/
38 define Package
/tar/config
40 config PACKAGE_TAR_POSIX_ACL
41 bool
"tar: Enable POSIX ACL support"
42 default y if USE_FS_ACL_ATTR
45 config PACKAGE_TAR_XATTR
46 bool
"tar: Enable extended attribute (xattr) support"
47 default y if USE_FS_ACL_ATTR
50 config PACKAGE_TAR_GZIP
51 bool
"tar: Enable seamless gzip support"
54 config PACKAGE_TAR_BZIP2
55 bool
"tar: Enable seamless bzip2 support"
59 bool
"tar: Enable seamless xz support"
60 select PACKAGE_xz-utils
66 define Package
/tar/description
67 Tar is a program for packaging a set of files
as a
68 single archive in
tar format.
71 define Package
/tar/postinst
73 if
[ -e
$${IPKG_INSTROOT}/bin
/tar ]; then
74 rm -r
$${IPKG_INSTROOT}/bin
/tar;
76 ln
-sf
/usr
/bin
/tar $${IPKG_INSTROOT}/bin
/tar
79 define Package
/tar/postrm
81 rm $${IPKG_INSTROOT}/bin
/tar
82 ln
-s busybox
$${IPKG_INSTROOT}/bin
/tar
83 $${IPKG_INSTROOT}/bin
/tar 2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/bin
/tar
88 $(if
$(CONFIG_PACKAGE_TAR_POSIX_ACL
),--with
,--without
)-posix-acls \
89 $(if
$(CONFIG_PACKAGE_TAR_XATTR
),--with
,--without
)-xattrs \
90 $(if
$(CONFIG_PACKAGE_TAR_GZIP
),--with-gzip
=gzip
,--without-gzip
) \
91 $(if
$(CONFIG_PACKAGE_TAR_BZIP2
),--with-bzip2
=bzip2
,--without-bzip2
) \
92 $(if
$(CONFIG_PACKAGE_TAR_XZ
),--with-xz
=xz
,--without-xz
) \
100 CFLAGS
="$(TARGET_CFLAGS)" \
101 LDFLAGS
="$(TARGET_LDLAGS)"
103 define Package
/tar/install
104 $(INSTALL_DIR
) $(1)/usr
/bin
/
105 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(PKG_NAME
) $(1)/usr
/bin
/
108 $(eval
$(call BuildPackage
,tar))