Browse Source

Merge pull request #2402 from cshore/pull-request-tar-options

utils/tar: Make compression, acl, and xattr support configuration opt…
lilik-openwrt-22.03
Álvaro Fernández Rojas 8 years ago
parent
commit
a4995e3323
1 changed files with 42 additions and 2 deletions
  1. +42
    -2
      utils/tar/Makefile

+ 42
- 2
utils/tar/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tar PKG_NAME:=tar
PKG_VERSION:=1.28 PKG_VERSION:=1.28
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@GNU/$(PKG_NAME) PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
@ -21,14 +21,42 @@ PKG_LICENSE_FILES:=COPYING
PKG_INSTALL:=1 PKG_INSTALL:=1
BUILD_DEPENDS:=xz
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/tar define Package/tar
SECTION:=utils SECTION:=utils
CATEGORY:=Utilities CATEGORY:=Utilities
DEPENDS:=+bzip2 +libacl +libattr
DEPENDS:=+PACKAGE_TAR_POSIX_ACL:libacl +PACKAGE_TAR_XATTR:libattr +PACKAGE_TAR_BZIP2:bzip2
EXTRA_DEPENDS:=$(if $(CONFIG_PACKAGE_TAR_XZ),xz)
TITLE:=GNU tar TITLE:=GNU tar
URL:=http://www.gnu.org/software/tar/ URL:=http://www.gnu.org/software/tar/
MENU:=1
endef
define Package/tar/config
config PACKAGE_TAR_POSIX_ACL
bool "tar: Enable POSIX ACL support" if PACKAGE_tar
default n
config PACKAGE_TAR_XATTR
bool "tar: Enable extended attribute (xattr) support" if PACKAGE_tar
default n
config PACKAGE_TAR_GZIP
bool "tar: Enable seamless gzip support" if PACKAGE_tar
default y
config PACKAGE_TAR_BZIP2
bool "tar: Enable seamless bzip2 support" if PACKAGE_tar
default y
config PACKAGE_TAR_XZ
bool "tar: Enable seamless xz support" if PACKAGE_tar
select PACKAGE_xz-utils
select PACKAGE_xz
default y
endef endef
define Package/tar/description define Package/tar/description
@ -52,6 +80,18 @@ $${IPKG_INSTROOT}/bin/tar 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm
exit 0 exit 0
endef endef
CONFIGURE_ARGS += \
$(if $(CONFIG_PACKAGE_TAR_POSIX_ACL),--with,--without)-posix-acls \
$(if $(CONFIG_PACKAGE_TAR_XATTR),--with,--without)-xattrs \
$(if $(CONFIG_PACKAGE_TAR_GZIP),--with-gzip=gzip,--without-gzip) \
$(if $(CONFIG_PACKAGE_TAR_BZIP2),--with-bzip2=bzip2,--without-bzip2) \
$(if $(CONFIG_PACKAGE_TAR_XZ),--with-xz=xz,--without-xz) \
--without-compress \
--without-lzip \
--without-lzma \
--without-lzop \
--without-selinux
MAKE_FLAGS += \ MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDLAGS)" LDFLAGS="$(TARGET_LDLAGS)"


Loading…
Cancel
Save