mke2fs.mk 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #############################################################
  2. #
  3. # mke2fs
  4. #
  5. #############################################################
  6. MKE2FS_SOURCE=e2fsprogs-1.27.tar.gz
  7. MKE2FS_SITE=http://telia.dl.sourceforge.net/sourceforge/e2fsprogs
  8. MKE2FS_DIR=$(BUILD_DIR)/e2fsprogs-1.27
  9. MKE2FS_CAT:=zcat
  10. MKE2FS_BINARY:=misc/mke2fs
  11. MKE2FS_TARGET_BINARY:=sbin/mke2fs
  12. $(DL_DIR)/$(MKE2FS_SOURCE):
  13. $(WGET) -P $(DL_DIR) $(MKE2FS_SITE)/$(MKE2FS_SOURCE)
  14. mke2fs-source: $(DL_DIR)/$(MKE2FS_SOURCE)
  15. $(MKE2FS_DIR)/.unpacked: $(DL_DIR)/$(MKE2FS_SOURCE)
  16. $(MKE2FS_CAT) $(DL_DIR)/$(MKE2FS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
  17. touch $(MKE2FS_DIR)/.unpacked
  18. $(MKE2FS_DIR)/.configured: $(MKE2FS_DIR)/.unpacked
  19. (cd $(MKE2FS_DIR); rm -rf config.cache; \
  20. $(TARGET_CONFIGURE_OPTS) \
  21. ./configure \
  22. --target=$(GNU_TARGET_NAME) \
  23. --host=$(GNU_TARGET_NAME) \
  24. --build=$(GNU_HOST_NAME) \
  25. --with-cc=$(TARGET_CC) \
  26. --with-linker=$(TARGET_CROSS)ld \
  27. --prefix=/usr \
  28. --exec-prefix=/usr \
  29. --bindir=/usr/bin \
  30. --sbindir=/usr/sbin \
  31. --libexecdir=/usr/lib \
  32. --sysconfdir=/etc \
  33. --datadir=/usr/share \
  34. --localstatedir=/var \
  35. --mandir=/usr/man \
  36. --infodir=/usr/info \
  37. --disable-elf-shlibs --disable-swapfs \
  38. --disable-debugfs --disable-imager \
  39. --disable-resizer --disable-fsck \
  40. --without-catgets --disable-nls \
  41. );
  42. touch $(MKE2FS_DIR)/.configured
  43. $(MKE2FS_DIR)/$(MKE2FS_BINARY): $(MKE2FS_DIR)/.configured
  44. $(MAKE) CC=$(TARGET_CC) -C $(MKE2FS_DIR)
  45. $(STRIP) $(MKE2FS_DIR)/misc/mke2fs $(MKE2FS_DIR)/misc/badblocks;
  46. touch -c $(MKE2FS_DIR)/misc/mke2fs
  47. $(TARGET_DIR)/$(MKE2FS_TARGET_BINARY): $(MKE2FS_DIR)/$(MKE2FS_BINARY)
  48. #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKE2FS_DIR) install
  49. #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
  50. # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
  51. # Only install a few selected items...
  52. cp -dpf $(MKE2FS_DIR)/misc/mke2fs $(TARGET_DIR)/sbin/mke2fs;
  53. cp -dpf $(MKE2FS_DIR)/misc/badblocks $(TARGET_DIR)/sbin/badblocks;
  54. touch -c $(TARGET_DIR)/sbin/mke2fs
  55. mke2fs: uclibc $(TARGET_DIR)/$(MKE2FS_TARGET_BINARY)
  56. mke2fs-clean:
  57. #$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKE2FS_DIR) uninstall
  58. rm -f $(TARGET_DIR)/sbin/mke2fs $(TARGET_DIR)/sbin/badblocks;
  59. -$(MAKE) -C $(MKE2FS_DIR) clean
  60. mke2fs-dirclean:
  61. rm -rf $(MKE2FS_DIR)