The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / e2fsprogs / e2fsprogs.mk
1 ################################################################################
2 #
3 # e2fsprogs
4 #
5 ################################################################################
6
7 E2FSPROGS_VERSION = 1.42.12
8 E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
9 E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
10 E2FSPROGS_LICENSE = GPLv2, libuuid BSD-3c, libss and libet MIT-like with advertising clause
11 E2FSPROGS_LICENSE_FILES = COPYING lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h
12 E2FSPROGS_INSTALL_STAGING = YES
13 E2FSPROGS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-libs
14
15 E2FSPROGS_CONF_OPTS = \
16         $(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
17         $(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \
18         $(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \
19         $(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \
20         $(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \
21         --disable-uuidd \
22         --disable-libblkid \
23         --disable-libuuid \
24         --enable-fsck \
25         --disable-e2initrd-helper \
26         --disable-testio-debug \
27         --disable-rpath
28
29 ifeq ($(BR2_nios2),y)
30 E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
31 endif
32
33 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
34 # util-linux libuuid pulls in libintl if needed, so ensure we also
35 # link against it, otherwise static linking fails
36 E2FSPROGS_CONF_ENV += LIBS=-lintl
37 endif
38
39 E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
40
41 E2FSPROGS_MAKE_OPTS = \
42         LDCONFIG=true
43
44 define HOST_E2FSPROGS_INSTALL_CMDS
45         $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
46 endef
47 # we don't have a host-util-linux
48 HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf
49
50 # binaries to keep or remove
51 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks
52 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_CHATTR) += usr/bin/chattr
53 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS) += usr/sbin/dumpe2fs
54 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG) += usr/sbin/e2freefrag
55 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FSCK) += usr/sbin/e2fsck
56 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2LABEL) += usr/sbin/e2label
57 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2UNDO) += usr/sbin/e2undo
58 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG) += usr/sbin/e4defrag
59 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FILEFRAG) += usr/sbin/filefrag
60 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FSCK) += usr/sbin/fsck
61 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LOGSAVE) += usr/sbin/logsave
62 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LSATTR) += usr/bin/lsattr
63 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKE2FS) += usr/sbin/mke2fs
64 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND) += usr/sbin/mklost+found
65 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen
66
67 # files to remove
68 E2FSPROGS_TXTTARGETS_ = \
69         usr/sbin/mkfs.ext[234] \
70         usr/sbin/mkfs.ext4dev \
71         usr/sbin/fsck.ext[234] \
72         usr/sbin/fsck.ext4dev \
73         usr/sbin/findfs \
74         usr/sbin/tune2fs
75
76 define E2FSPROGS_TARGET_REMOVE_UNNEEDED
77         rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_))
78         rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_))
79 endef
80
81 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED
82
83 define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
84         ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2
85         ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3
86         ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4
87         ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev
88 endef
89
90 ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y)
91 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS
92 endif
93
94 define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
95         ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2
96         ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3
97         ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4
98         ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev
99 endef
100
101 ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y)
102 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS
103 endif
104
105 define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
106         ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs
107 endef
108
109 ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y)
110 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK
111 endif
112
113 define E2FSPROGS_TARGET_FINDFS_SYMLINK
114         ln -sf e2label $(TARGET_DIR)/usr/sbin/findfs
115 endef
116
117 ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y)
118 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK
119 endif
120
121 $(eval $(autotools-package))
122 $(eval $(host-autotools-package))