1 ################################################################################
5 ################################################################################
7 E2FSPROGS_VERSION
= 1.42.13
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
15 # e4defrag doesn't build on older systems like RHEL5.x, and we don't
16 # need it on the host anyway.
17 HOST_E2FSPROGS_CONF_OPTS
+= --disable-defrag
19 E2FSPROGS_CONF_OPTS
= \
20 $(if
$(BR2_STATIC_LIBS
),,--enable-elf-shlibs
) \
21 $(if
$(BR2_PACKAGE_E2FSPROGS_DEBUGFS
),,--disable-debugfs
) \
22 $(if
$(BR2_PACKAGE_E2FSPROGS_E2IMAGE
),,--disable-imager
) \
23 $(if
$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG
),,--disable-defrag
) \
24 $(if
$(BR2_PACKAGE_E2FSPROGS_RESIZE2FS
),,--disable-resizer
) \
29 --disable-e2initrd-helper \
30 --disable-testio-debug \
34 E2FSPROGS_CONF_ENV
+= ac_cv_func_fallocate
=no
37 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE
),y
)
38 # util-linux libuuid pulls in libintl if needed, so ensure we also
39 # link against it, otherwise static linking fails
40 E2FSPROGS_CONF_ENV
+= LIBS
=-lintl
43 E2FSPROGS_DEPENDENCIES
= host-pkgconf util-linux
45 E2FSPROGS_MAKE_OPTS
= \
48 define HOST_E2FSPROGS_INSTALL_CMDS
49 $(HOST_MAKE_ENV
) $(MAKE
) -C
$(@D
) install install-libs
51 # we don't have a host-util-linux
52 HOST_E2FSPROGS_DEPENDENCIES
= host-pkgconf
54 # binaries to keep or remove
55 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS
) += usr
/sbin
/badblocks
56 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_CHATTR
) += usr
/bin
/chattr
57 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS
) += usr
/sbin
/dumpe2fs
58 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG
) += usr
/sbin
/e2freefrag
59 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2FSCK
) += usr
/sbin
/e2fsck
60 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2LABEL
) += usr
/sbin
/e2label
61 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E2UNDO
) += usr
/sbin
/e2undo
62 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG
) += usr
/sbin
/e4defrag
63 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_FILEFRAG
) += usr
/sbin
/filefrag
64 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_FSCK
) += usr
/sbin
/fsck
65 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_LOGSAVE
) += usr
/sbin
/logsave
66 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_LSATTR
) += usr
/bin
/lsattr
67 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_MKE2FS
) += usr
/sbin
/mke2fs
68 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND
) += usr
/sbin
/mklost
+found
69 E2FSPROGS_BINTARGETS_
$(BR2_PACKAGE_E2FSPROGS_UUIDGEN
) += usr
/bin
/uuidgen
72 E2FSPROGS_TXTTARGETS_
= \
73 usr
/sbin
/mkfs.ext
[234] \
74 usr
/sbin
/mkfs.ext4dev \
75 usr
/sbin
/fsck.ext
[234] \
76 usr
/sbin
/fsck.ext4dev \
80 define E2FSPROGS_TARGET_REMOVE_UNNEEDED
81 rm -f
$(addprefix $(TARGET_DIR
)/, $(E2FSPROGS_BINTARGETS_
))
82 rm -f
$(addprefix $(TARGET_DIR
)/, $(E2FSPROGS_TXTTARGETS_
))
85 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_REMOVE_UNNEEDED
87 define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
88 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext2
89 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext3
90 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext4
91 ln
-sf mke2fs
$(TARGET_DIR
)/usr
/sbin
/mkfs.ext4dev
94 ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS
),y
)
95 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_MKE2FS_SYMLINKS
98 define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
99 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext2
100 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext3
101 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext4
102 ln
-sf e2fsck
$(TARGET_DIR
)/usr
/sbin
/fsck.ext4dev
105 ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK
),y
)
106 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_E2FSCK_SYMLINKS
109 # If BusyBox is included, its configuration may supply its own variant
110 # of ext2-related tools. Since Buildroot desires having full blown
111 # variants take precedence (in this case, e2fsprogs), we want to remove
112 # BusyBox's variant of e2fsprogs provided binaries. e2fsprogs targets
113 # /usr/{bin,sbin} where BusyBox targets /{bin,sbin}. We will attempt to
114 # remove BusyBox-generated ext2-related tools from /{bin,sbin}. We need
115 # to do this in the pre-install stage to ensure we do not accidentally
116 # remove e2fsprogs's binaries in usr-merged environments (ie. if they
117 # are removed, they would be re-installed in this package's install
119 ifeq ($(BR2_PACKAGE_BUSYBOX
),y
)
120 E2FSPROGS_DEPENDENCIES
+= busybox
122 define E2FSPROGS_REMOVE_BUSYBOX_APPLETS
123 $(RM
) -f
$(TARGET_DIR
)/bin
/chattr
124 $(RM
) -f
$(TARGET_DIR
)/bin
/lsattr
125 $(RM
) -f
$(TARGET_DIR
)/sbin
/fsck
126 $(RM
) -f
$(TARGET_DIR
)/sbin
/tune2fs
127 $(RM
) -f
$(TARGET_DIR
)/sbin
/e2label
129 E2FSPROGS_PRE_INSTALL_TARGET_HOOKS
+= E2FSPROGS_REMOVE_BUSYBOX_APPLETS
132 define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
133 ln
-sf e2label
$(TARGET_DIR
)/usr
/sbin
/tune2fs
136 ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS
),y
)
137 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_TUNE2FS_SYMLINK
140 define E2FSPROGS_TARGET_FINDFS_SYMLINK
141 ln
-sf e2label
$(TARGET_DIR
)/usr
/sbin
/findfs
144 ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS
),y
)
145 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_FINDFS_SYMLINK
148 # systemd really wants to have fsck in /sbin
149 define E2FSPROGS_TARGET_FSCK_SYMLINK
150 ln
-sf ..
/usr
/sbin
/fsck
$(TARGET_DIR
)/sbin
/fsck
153 ifeq ($(BR2_PACKAGE_E2FSPROGS_FSCK
),y
)
154 E2FSPROGS_POST_INSTALL_TARGET_HOOKS
+= E2FSPROGS_TARGET_FSCK_SYMLINK
157 $(eval
$(autotools-package
))
158 $(eval
$(host-autotools-package
))