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