e2fsprogs.mk 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #############################################################
  2. #
  3. # e2fsprogs
  4. #
  5. #############################################################
  6. E2FSPROGS_VERSION:=1.41.12
  7. E2FSPROGS_SOURCE=e2fsprogs-$(E2FSPROGS_VERSION).tar.gz
  8. E2FSPROGS_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/e2fsprogs
  9. E2FSPROGS_AUTORECONF = NO
  10. E2FSPROGS_LIBTOOL_PATCH = NO
  11. E2FSPROGS_INSTALL_STAGING = YES
  12. E2FSPROGS_INSTALL_TARGET = YES
  13. E2FSPROGS_CONF_OPT = \
  14. --disable-tls \
  15. --enable-elf-shlibs \
  16. --disable-debugfs \
  17. --disable-imager \
  18. --disable-resizer \
  19. --enable-fsck \
  20. --disable-e2initrd-helper \
  21. --disable-testio-debug
  22. E2FSPROGS_MAKE_OPT = \
  23. LDCONFIG=true
  24. define HOST_E2FSPROGS_INSTALL_CMDS
  25. $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs
  26. endef
  27. # binaries to keep or remove
  28. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks
  29. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BLKID) += usr/sbin/blkid
  30. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_CHATTR) += usr/bin/chattr
  31. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS) += usr/sbin/dumpe2fs
  32. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG) += usr/sbin/e2freefrag
  33. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FSCK) += usr/sbin/e2fsck
  34. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2LABEL) += usr/sbin/e2label
  35. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2UNDO) += usr/sbin/e2undo
  36. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FILEFRAG) += usr/sbin/filefrag
  37. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FSCK) += usr/sbin/fsck
  38. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LOGSAVE) += usr/sbin/logsave
  39. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LSATTR) += usr/bin/lsattr
  40. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKE2FS) += usr/sbin/mke2fs
  41. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND) += usr/sbin/mklost+found
  42. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDD) += usr/sbin/uuidd
  43. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen
  44. # libraries to keep or remove
  45. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LIBUUID) += usr/lib/libuuid.so*
  46. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LIBBLKID) += usr/lib/libblkid.so*
  47. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UTILS) += usr/lib/libcom_err.so*
  48. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UTILS) += usr/lib/libe2p.so*
  49. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UTILS) += usr/lib/libext2fs.so*
  50. E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UTILS) += usr/lib/libss.so*
  51. # files to remove
  52. E2FSPROGS_TXTTARGETS_ = \
  53. usr/sbin/mkfs.ext[234] \
  54. usr/sbin/mkfs.ext4dev \
  55. usr/sbin/fsck.ext[234] \
  56. usr/sbin/fsck.ext4dev \
  57. usr/sbin/findfs \
  58. usr/sbin/tune2fs
  59. define E2FSPROGS_TARGET_REMOVE_UNNEEDED
  60. rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_))
  61. rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_))
  62. endef
  63. E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED
  64. define E2FSPROGS_TARGET_MKE2FS_SYMLINKS
  65. ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2
  66. ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3
  67. ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4
  68. ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev
  69. endef
  70. ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y)
  71. E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS
  72. endif
  73. define E2FSPROGS_TARGET_E2FSCK_SYMLINKS
  74. ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2
  75. ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3
  76. ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4
  77. ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev
  78. endef
  79. ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y)
  80. E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS
  81. endif
  82. define E2FSPROGS_TARGET_TUNE2FS_SYMLINK
  83. ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs
  84. endef
  85. ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y)
  86. E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK
  87. endif
  88. define E2FSPROGS_TARGET_FINDFS_SYMLINK
  89. ln -sf e2label $(TARGET_DIR)/usr/sbin/findfs
  90. endef
  91. ifeq ($(BR2_PACKAGE_E2FSPROGS_FINDFS),y)
  92. E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FINDFS_SYMLINK
  93. endif
  94. define E2FSPROGS_STAGING_LIBUUID_INSTALL
  95. install -D $(@D)/lib/uuid/uuid.h $(STAGING_DIR)/usr/include/uuid/uuid.h
  96. endef
  97. ifeq ($(BR2_PACKAGE_E2FSPROGS_LIBUUID),y)
  98. E2FSPROGS_POST_INSTALL_STAGING_HOOKS += E2FSPROGS_STAGING_LIBUUID_INSTALL
  99. endif
  100. $(eval $(call AUTOTARGETS,package,e2fsprogs))
  101. $(eval $(call AUTOTARGETS,package,e2fsprogs,host))