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_MD5SUM
:=955cd533955acb1804b83fd70218da51
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"
44 config PACKAGE_TAR_XATTR
45 bool
"tar: Enable extended attribute (xattr) support"
48 config PACKAGE_TAR_GZIP
49 bool
"tar: Enable seamless gzip support"
52 config PACKAGE_TAR_BZIP2
53 bool
"tar: Enable seamless bzip2 support"
57 bool
"tar: Enable seamless xz support"
58 select PACKAGE_xz-utils
64 define Package
/tar/description
65 Tar is a program for packaging a set of files
as a
66 single archive in
tar format.
69 define Package
/tar/postinst
71 if
[ -e
$${IPKG_INSTROOT}/bin
/tar ]; then
72 rm -r
$${IPKG_INSTROOT}/bin
/tar;
74 ln
-sf
/usr
/bin
/tar $${IPKG_INSTROOT}/bin
/tar
77 define Package
/tar/postrm
79 rm $${IPKG_INSTROOT}/bin
/tar
80 ln
-s busybox
$${IPKG_INSTROOT}/bin
/tar
81 $${IPKG_INSTROOT}/bin
/tar 2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/bin
/tar
86 $(if
$(CONFIG_PACKAGE_TAR_POSIX_ACL
),--with
,--without
)-posix-acls \
87 $(if
$(CONFIG_PACKAGE_TAR_XATTR
),--with
,--without
)-xattrs \
88 $(if
$(CONFIG_PACKAGE_TAR_GZIP
),--with-gzip
=gzip
,--without-gzip
) \
89 $(if
$(CONFIG_PACKAGE_TAR_BZIP2
),--with-bzip2
=bzip2
,--without-bzip2
) \
90 $(if
$(CONFIG_PACKAGE_TAR_XZ
),--with-xz
=xz
,--without-xz
) \
98 CFLAGS
="$(TARGET_CFLAGS)" \
99 LDFLAGS
="$(TARGET_LDLAGS)"
101 define Package
/tar/install
102 $(INSTALL_DIR
) $(1)/usr
/bin
/
103 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(PKG_NAME
) $(1)/usr
/bin
/
106 $(eval
$(call BuildPackage
,tar))