tar.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ################################################################################
  2. #
  3. # tar
  4. #
  5. ################################################################################
  6. TAR_VERSION = 1.29
  7. TAR_SOURCE = tar-$(TAR_VERSION).tar.xz
  8. TAR_SITE = $(BR2_GNU_MIRROR)/tar
  9. # busybox installs in /bin, so we need tar to install as well in /bin
  10. # so that it overrides the Busybox symlinks.
  11. TAR_CONF_OPTS = --exec-prefix=/
  12. TAR_LICENSE = GPL-3.0+
  13. TAR_LICENSE_FILES = COPYING
  14. # Prefer full-blown tar over buybox's version
  15. ifeq ($(BR2_PACKAGE_BUSYBOX),y)
  16. TAR_DEPENDENCIES += busybox
  17. endif
  18. ifeq ($(BR2_PACKAGE_ACL),y)
  19. TAR_DEPENDENCIES += acl
  20. TAR_CONF_OPTS += --with-posix-acls
  21. else
  22. TAR_CONF_OPTS += --without-posix-acls
  23. endif
  24. ifeq ($(BR2_PACKAGE_ATTR),y)
  25. TAR_DEPENDENCIES += attr
  26. TAR_CONF_OPTS += --with-xattrs
  27. else
  28. TAR_CONF_OPTS += --without-xattrs
  29. endif
  30. $(eval $(autotools-package))
  31. # host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem
  32. # of needing tar to build tar.
  33. HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz
  34. define HOST_TAR_EXTRACT_CMDS
  35. mkdir -p $(@D)
  36. cd $(@D) && \
  37. $(call suitable-extractor,$(HOST_TAR_SOURCE)) $(TAR_DL_DIR)/$(HOST_TAR_SOURCE) | cpio -i --preserve-modification-time
  38. mv $(@D)/tar-$(TAR_VERSION)/* $(@D)
  39. rmdir $(@D)/tar-$(TAR_VERSION)
  40. endef
  41. HOST_TAR_CONF_OPTS = --without-selinux
  42. # we are built before ccache
  43. HOST_TAR_CONF_ENV = \
  44. CC="$(HOSTCC_NOCCACHE)" \
  45. CXX="$(HOSTCXX_NOCCACHE)"
  46. $(eval $(host-autotools-package))