1 ################################################################################
5 ################################################################################
7 E2FSPROGS_VERSION = 1.42.12
8 E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
9 E2FSPROGS_LICENSE = GPLv2, libuuid BSD-3c, libss and libet MIT-like with advertising clause
10 E2FSPROGS_LICENSE_FILES = COPYING lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h
11 E2FSPROGS_INSTALL_STAGING = YES
12 E2FSPROGS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-libs
14 E2FSPROGS_CONF_OPTS = \
15 $(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
16 $(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \
17 $(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \
18 $(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \
19 $(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \
24 --disable-e2initrd-helper \
25 --disable-testio-debug \
29 E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
32 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
33 # util-linux libuuid pulls in libintl if needed, so ensure we also
34 # link against it, otherwise static linking fails
35 E2FSPROGS_CONF_ENV += LIBS=-lintl
38 E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
40 E2FSPROGS_MAKE_OPTS = \
43 define HOST_E2FSPROGS_INSTALL_CMDS
44 $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
46 # we don't have a host-util-linux
47 HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf
49 # binaries to keep or remove
50 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks
51 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_CHATTR) += usr/bin/chattr
52 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS) += usr/sbin/dumpe2fs
53 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG) += usr/sbin/e2freefrag
54 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FSCK) += usr/sbin/e2fsck
55 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2LABEL) += usr/sbin/e2label
56 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2UNDO) += usr/sbin/e2undo
57 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG) += usr/sbin/e4defrag
58 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FILEFRAG) += usr/sbin/filefrag
59 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FSCK) += usr/sbin/fsck
60 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LOGSAVE) += usr/sbin/logsave
61 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LSATTR) += usr/bin/lsattr
62 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKE2FS) += usr/sbin/mke2fs
63 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND) += usr/sbin/mklost+found
64 E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen
67 E2FSPROGS_TXTTARGETS_ = \
68 usr/sbin/mkfs.ext[234] \
69 usr/sbin/mkfs.ext4dev \
70 usr/sbin/fsck.ext[234] \
71 usr/sbin/fsck.ext4dev \
75 define E2FSPROGS_TARGET_REMOVE_UNNEEDED
76 rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_))
77 rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_))
80 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED
82 define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
83 ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2
84 ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3
85 ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4
86 ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev
89 ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y)
90 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS
93 define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
94 ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2
95 ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3
96 ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4
97 ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev
100 ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y)
101 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS
104 define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
105 ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs
108 ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y)
109 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK
112 define E2FSPROGS_TARGET_FINDFS_SYMLINK
113 ln -sf e2label $(TARGET_DIR)/usr/sbin/findfs
116 ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y)
117 E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK
120 $(eval $(autotools-package))
121 $(eval $(host-autotools-package))