1 ################################################################################
5 ################################################################################
7 E2FSPROGS_VERSION
= 1.43.3
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
= NOTICE 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 E2FSPROGS_DEPENDENCIES
= host-pkgconf util-linux
15 # we don't have a host-util-linux
16 HOST_E2FSPROGS_DEPENDENCIES
= host-pkgconf
18 # e4defrag doesn't build on older systems like RHEL5.x, and we don't
19 # need it on the host anyway.
20 # Disable fuse2fs as well to avoid carrying over deps, and it's unused
21 HOST_E2FSPROGS_CONF_OPTS
+= --disable-defrag
--disable-fuse2fs
23 E2FSPROGS_CONF_OPTS
= \
24 $(if
$(BR2_STATIC_LIBS
),,--enable-elf-shlibs
) \
25 $(if
$(BR2_PACKAGE_E2FSPROGS_DEBUGFS
),,--disable-debugfs
) \
26 $(if
$(BR2_PACKAGE_E2FSPROGS_E2IMAGE
),,--disable-imager
) \
27 $(if
$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG
),,--disable-defrag
) \
28 $(if
$(BR2_PACKAGE_E2FSPROGS_RESIZE2FS
),,--disable-resizer
) \
33 --disable-e2initrd-helper \
34 --disable-testio-debug \
37 ifeq ($(BR2_PACKAGE_E2FSPROGS_FUSE2FS
),y
)
38 E2FSPROGS_CONF_OPTS
+= --enable-fuse2fs
39 E2FSPROGS_DEPENDENCIES
+= libfuse
41 E2FSPROGS_CONF_OPTS
+= --disable-fuse2fs
45 E2FSPROGS_CONF_ENV
+= ac_cv_func_fallocate
=no
48 # Some programs are built for the host, but use definitions guessed by
49 # the configure script (i.e with the cross-compiler). Help them by
50 # saying that <sys/stat.h> is available on the host, which is needed
51 # for util/subst.c to build properly.
52 E2FSPROGS_CONF_ENV
+= BUILD_CFLAGS
="-DHAVE_SYS_STAT_H"
54 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE
),y
)
55 # util-linux libuuid pulls in libintl if needed, so ensure we also
56 # link against it, otherwise static linking fails
57 E2FSPROGS_CONF_ENV
+= LIBS
=-lintl
60 E2FSPROGS_MAKE_OPTS
= \
63 define HOST_E2FSPROGS_INSTALL_CMDS
64 $(HOST_MAKE_ENV
) $(MAKE
) -C
$(@D
) install install-libs
67 # binaries to keep or remove
68 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS
) += usr
/sbin
/badblocks
69 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_CHATTR
) += usr
/bin
/chattr
70 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS
) += usr
/sbin
/dumpe2fs
71 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG
) += usr
/sbin
/e2freefrag
72 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2FSCK
) += usr
/sbin
/e2fsck
73 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2LABEL
) += usr
/sbin
/e2label
74 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2UNDO
) += usr
/sbin
/e2undo
75 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG
) += usr
/sbin
/e4defrag
76 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_FILEFRAG
) += usr
/sbin
/filefrag
77 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_FSCK
) += usr
/sbin
/fsck
78 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_LOGSAVE
) += usr
/sbin
/logsave
79 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_LSATTR
) += usr
/bin
/lsattr
80 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_MKE2FS
) += usr
/sbin
/mke2fs
81 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND
) += usr
/sbin
/mklost
+found
82 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_UUIDGEN
) += usr
/bin
/uuidgen
85 E2FSPROGS_TXTTARGETS_
= \
86 usr
/sbin
/mkfs.ext
[234] \
87 usr
/sbin
/mkfs.ext4dev \
88 usr
/sbin
/fsck.ext
[234] \
89 usr
/sbin
/fsck.ext4dev \
92 define E2FSPROGS_TARGET_REMOVE_UNNEEDED
93 rm -f
$(addprefix $(TARGET_DIR
)/, $(E2FSPROGS_BINTARGETS_
))
94 rm -f
$(addprefix $(TARGET_DIR
)/, $(E2FSPROGS_TXTTARGETS_
))
97 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_REMOVE_UNNEEDED
99 define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
100 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext2
101 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext3
102 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext4
103 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext4dev
106 ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS
),y
)
107 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_MKE2FS_SYMLINKS
110 define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
111 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext2
112 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext3
113 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext4
114 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext4dev
117 ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK
),y
)
118 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_E2FSCK_SYMLINKS
121 # If BusyBox is included, its configuration may supply its own variant
122 # of ext2-related tools. Since Buildroot desires having full blown
123 # variants take precedence (in this case, e2fsprogs), we want to remove
124 # BusyBox's variant of e2fsprogs provided binaries. e2fsprogs targets
125 # /usr/{bin,sbin} where BusyBox targets /{bin,sbin}. We will attempt to
126 # remove BusyBox-generated ext2-related tools from /{bin,sbin}. We need
127 # to do this in the pre-install stage to ensure we do not accidentally
128 # remove e2fsprogs's binaries in usr-merged environments (ie. if they
129 # are removed, they would be re-installed in this package's install
131 ifeq ($(BR2_PACKAGE_BUSYBOX
),y
)
132 E2FSPROGS_DEPENDENCIES
+= busybox
134 define E2FSPROGS_REMOVE_BUSYBOX_APPLETS
135 $(RM
) -f
$(TARGET_DIR
)/bin
/chattr
136 $(RM
) -f
$(TARGET_DIR
)/bin
/lsattr
137 $(RM
) -f
$(TARGET_DIR
)/sbin
/fsck
138 $(RM
) -f
$(TARGET_DIR
)/sbin
/tune2fs
139 $(RM
) -f
$(TARGET_DIR
)/sbin
/e2label
141 E2FSPROGS_PRE_INSTALL_TARGET_HOOKS
+= E2FSPROGS_REMOVE_BUSYBOX_APPLETS
144 define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
145 ln
-sf e2label
$(TARGET_DIR
)/usr
/sbin
/tune2fs
148 ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS
),y
)
149 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_TUNE2FS_SYMLINK
152 $(eval
$(autotools-package
))
153 $(eval
$(host-autotools-package
))