2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-02-11 21:42:52 +01:00
|
|
|
#
|
|
|
|
# e2fsprogs
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-10-29 21:35:33 +01:00
|
|
|
|
2015-05-27 00:30:58 +02:00
|
|
|
E2FSPROGS_VERSION = 1.42.13
|
2015-03-03 09:41:11 +01:00
|
|
|
E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
|
2014-09-17 16:20:09 +02:00
|
|
|
E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
|
2012-11-13 02:05:41 +01:00
|
|
|
E2FSPROGS_LICENSE = GPLv2, libuuid BSD-3c, libss and libet MIT-like with advertising clause
|
|
|
|
E2FSPROGS_LICENSE_FILES = COPYING lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h
|
2013-11-28 18:53:57 +01:00
|
|
|
E2FSPROGS_INSTALL_STAGING = YES
|
2014-09-27 21:32:41 +02:00
|
|
|
E2FSPROGS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-libs
|
2009-10-29 21:35:33 +01:00
|
|
|
|
2015-07-29 20:47:38 +02:00
|
|
|
# e4defrag doesn't build on older systems like RHEL5.x, and we don't
|
|
|
|
# need it on the host anyway.
|
|
|
|
HOST_E2FSPROGS_CONF_OPTS += --disable-defrag
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
E2FSPROGS_CONF_OPTS = \
|
2014-12-03 22:41:29 +01:00
|
|
|
$(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \
|
2011-07-28 15:04:09 +02:00
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \
|
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \
|
2012-02-28 12:22:33 +01:00
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \
|
2011-07-28 15:04:09 +02:00
|
|
|
$(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \
|
2011-09-06 09:12:51 +02:00
|
|
|
--disable-uuidd \
|
2012-02-28 12:22:33 +01:00
|
|
|
--disable-libblkid \
|
2011-07-29 08:49:48 +02:00
|
|
|
--disable-libuuid \
|
2009-10-29 21:35:33 +01:00
|
|
|
--enable-fsck \
|
|
|
|
--disable-e2initrd-helper \
|
2014-06-04 01:15:56 +02:00
|
|
|
--disable-testio-debug \
|
|
|
|
--disable-rpath
|
2009-10-29 21:35:33 +01:00
|
|
|
|
2014-02-20 22:59:37 +01:00
|
|
|
ifeq ($(BR2_nios2),y)
|
|
|
|
E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
|
|
|
|
endif
|
|
|
|
|
2014-11-19 15:04:50 +01:00
|
|
|
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
|
|
|
|
# util-linux libuuid pulls in libintl if needed, so ensure we also
|
|
|
|
# link against it, otherwise static linking fails
|
|
|
|
E2FSPROGS_CONF_ENV += LIBS=-lintl
|
|
|
|
endif
|
|
|
|
|
2012-10-22 17:47:52 +02:00
|
|
|
E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
|
2011-07-28 15:45:02 +02:00
|
|
|
|
2014-09-27 21:32:38 +02:00
|
|
|
E2FSPROGS_MAKE_OPTS = \
|
2009-10-29 21:35:33 +01:00
|
|
|
LDCONFIG=true
|
|
|
|
|
2010-03-02 22:33:55 +01:00
|
|
|
define HOST_E2FSPROGS_INSTALL_CMDS
|
2014-10-23 10:43:37 +02:00
|
|
|
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
|
2010-03-02 22:33:55 +01:00
|
|
|
endef
|
2012-01-18 10:55:36 +01:00
|
|
|
# we don't have a host-util-linux
|
2012-10-22 17:47:52 +02:00
|
|
|
HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf
|
2010-03-02 22:33:55 +01:00
|
|
|
|
2009-10-29 21:35:33 +01:00
|
|
|
# binaries to keep or remove
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_CHATTR) += usr/bin/chattr
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS) += usr/sbin/dumpe2fs
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG) += usr/sbin/e2freefrag
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FSCK) += usr/sbin/e2fsck
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2LABEL) += usr/sbin/e2label
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2UNDO) += usr/sbin/e2undo
|
2012-01-26 17:51:29 +01:00
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG) += usr/sbin/e4defrag
|
2009-10-29 21:35:33 +01:00
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FILEFRAG) += usr/sbin/filefrag
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FSCK) += usr/sbin/fsck
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LOGSAVE) += usr/sbin/logsave
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LSATTR) += usr/bin/lsattr
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKE2FS) += usr/sbin/mke2fs
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND) += usr/sbin/mklost+found
|
|
|
|
E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen
|
|
|
|
|
|
|
|
# files to remove
|
|
|
|
E2FSPROGS_TXTTARGETS_ = \
|
|
|
|
usr/sbin/mkfs.ext[234] \
|
|
|
|
usr/sbin/mkfs.ext4dev \
|
|
|
|
usr/sbin/fsck.ext[234] \
|
|
|
|
usr/sbin/fsck.ext4dev \
|
|
|
|
usr/sbin/findfs \
|
|
|
|
usr/sbin/tune2fs
|
|
|
|
|
2010-09-01 22:52:48 +02:00
|
|
|
define E2FSPROGS_TARGET_REMOVE_UNNEEDED
|
2009-10-29 21:35:33 +01:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_))
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_))
|
2010-09-01 22:52:48 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED
|
|
|
|
|
|
|
|
define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4
|
|
|
|
ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS
|
2008-02-25 00:02:56 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
|
|
|
define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4
|
|
|
|
ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS
|
2008-02-25 00:02:56 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
2015-07-08 23:51:00 +02:00
|
|
|
# Remove busybox tune2fs and e2label, since we want the e2fsprogs full
|
|
|
|
# blown variants to take precedence, but they are not installed in the
|
|
|
|
# same location.
|
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
E2FSPROGS_DEPENDENCIES += busybox
|
|
|
|
|
|
|
|
define E2FSPROGS_REMOVE_BUSYBOX_APPLETS
|
2015-07-22 18:29:16 +02:00
|
|
|
$(RM) -f $(TARGET_DIR)/bin/chattr
|
|
|
|
$(RM) -f $(TARGET_DIR)/bin/lsattr
|
|
|
|
$(RM) -f $(TARGET_DIR)/sbin/fsck
|
2015-07-08 23:51:00 +02:00
|
|
|
$(RM) -f $(TARGET_DIR)/sbin/tune2fs
|
|
|
|
$(RM) -f $(TARGET_DIR)/sbin/e2label
|
|
|
|
endef
|
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_REMOVE_BUSYBOX_APPLETS
|
|
|
|
endif
|
|
|
|
|
2010-09-01 22:52:48 +02:00
|
|
|
define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
|
|
|
|
ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK
|
2008-02-25 00:02:56 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
|
|
|
define E2FSPROGS_TARGET_FINDFS_SYMLINK
|
|
|
|
ln -sf e2label $(TARGET_DIR)/usr/sbin/findfs
|
|
|
|
endef
|
|
|
|
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y)
|
2010-09-01 22:52:48 +02:00
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK
|
2009-12-21 08:18:32 +01:00
|
|
|
endif
|
2010-09-01 22:52:48 +02:00
|
|
|
|
2015-01-19 17:14:08 +01:00
|
|
|
# systemd really wants to have fsck in /sbin
|
|
|
|
define E2FSPROGS_TARGET_FSCK_SYMLINK
|
|
|
|
ln -sf ../usr/sbin/fsck $(TARGET_DIR)/sbin/fsck
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_E2FSPROGS_FSCK),y)
|
|
|
|
E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FSCK_SYMLINK
|
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-autotools-package))
|