e2fsprogs.mk 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ################################################################################
  2. #
  3. # e2fsprogs
  4. #
  5. ################################################################################
  6. E2FSPROGS_VERSION = 1.47.0
  7. E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz
  8. E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION)
  9. E2FSPROGS_LICENSE = GPL-2.0, MIT-like with advertising clause (libss and libet)
  10. E2FSPROGS_LICENSE_FILES = NOTICE lib/ss/mit-sipb-copyright.h lib/et/internal.h
  11. E2FSPROGS_CPE_ID_VALID = YES
  12. E2FSPROGS_INSTALL_STAGING = YES
  13. # Use libblkid and libuuid from util-linux for host and target packages.
  14. # This prevents overriding them with e2fsprogs' ones, which may cause
  15. # problems for other packages.
  16. E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux
  17. HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf host-util-linux
  18. E2FSPROGS_SELINUX_MODULES = fstools
  19. # e4defrag doesn't build on older systems like RHEL5.x, and we don't
  20. # need it on the host anyway.
  21. # Disable fuse2fs as well to avoid carrying over deps, and it's unused
  22. HOST_E2FSPROGS_CONF_OPTS = \
  23. --disable-defrag \
  24. --disable-e2initrd-helper \
  25. --disable-fuse2fs \
  26. --disable-fsck \
  27. --disable-libblkid \
  28. --disable-libuuid \
  29. --disable-testio-debug \
  30. --enable-symlink-install \
  31. --enable-elf-shlibs \
  32. --with-crond-dir=no \
  33. --with-udev-rules-dir=no \
  34. --with-systemd-unit-dir=no
  35. # Set the binary directories to "/bin" and "/sbin", as busybox does,
  36. # so that we do not end up with two versions of e2fs tools.
  37. E2FSPROGS_CONF_OPTS = \
  38. --bindir=/bin \
  39. --sbindir=/sbin \
  40. $(if $(BR2_STATIC_LIBS),--disable-elf-shlibs,--enable-elf-shlibs) \
  41. $(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),--enable-debugfs,--disable-debugfs) \
  42. $(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),--enable-imager,--disable-imager) \
  43. $(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),--enable-defrag,--disable-defrag) \
  44. $(if $(BR2_PACKAGE_E2FSPROGS_FSCK),--enable-fsck,--disable-fsck) \
  45. $(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),--enable-resizer,--disable-resizer) \
  46. --disable-uuidd \
  47. --disable-libblkid \
  48. --disable-libuuid \
  49. --disable-e2initrd-helper \
  50. --disable-testio-debug \
  51. --disable-rpath \
  52. --enable-symlink-install
  53. ifeq ($(BR2_PACKAGE_E2FSPROGS_FUSE2FS),y)
  54. E2FSPROGS_CONF_OPTS += --enable-fuse2fs
  55. E2FSPROGS_DEPENDENCIES += libfuse
  56. else
  57. E2FSPROGS_CONF_OPTS += --disable-fuse2fs
  58. endif
  59. ifeq ($(BR2_nios2),y)
  60. E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no
  61. endif
  62. # workaround gcc bug 111001
  63. ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_111001),y)
  64. E2FSPROGS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Os"
  65. endif
  66. E2FSPROGS_CONF_ENV += ac_cv_path_LDCONFIG=true
  67. HOST_E2FSPROGS_CONF_ENV += ac_cv_path_LDCONFIG=true
  68. E2FSPROGS_INSTALL_STAGING_OPTS = \
  69. DESTDIR=$(STAGING_DIR) \
  70. install-libs
  71. # e2scrub has no associated --enable/disable option
  72. ifneq ($(BR2_PACKAGE_E2FSPROGS_E2SCRUB),y)
  73. E2FSPROGS_MAKE_OPTS += E2SCRUB_DIR=
  74. endif
  75. E2FSPROGS_INSTALL_TARGET_OPTS = \
  76. $(E2FSPROGS_MAKE_OPTS) \
  77. DESTDIR=$(TARGET_DIR) \
  78. install
  79. # Package does not build in parallel due to improper make rules
  80. define HOST_E2FSPROGS_INSTALL_CMDS
  81. $(HOST_MAKE_ENV) $(MAKE1) -C $(@D) install install-libs
  82. endef
  83. # Remove compile_et which raises a build failure with samba4
  84. define HOST_E2FSPROGS_REMOVE_COMPILE_ET
  85. $(RM) $(HOST_DIR)/bin/compile_et
  86. endef
  87. HOST_E2FSPROGS_POST_INSTALL_HOOKS += HOST_E2FSPROGS_REMOVE_COMPILE_ET
  88. $(eval $(autotools-package))
  89. $(eval $(host-autotools-package))