Makefile 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. # Copyright 2010 Vertical Communications
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=e2fsprogs
  9. PKG_VERSION:=1.42.4
  10. PKG_MD5SUM:=b6e296f210d642361b7394437ff0f318
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/e2fsprogs
  14. PKG_BUILD_DEPENDS:=util-linux
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/e2fsprogs/Default
  18. URL:=http://e2fsprogs.sourceforge.net/
  19. SUBMENU:=Filesystem
  20. endef
  21. define Package/e2fsprogs
  22. $(call Package/e2fsprogs/Default)
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=Ext2/3/4 filesystem utilities
  26. DEPENDS:=+libuuid +libext2fs
  27. endef
  28. define Package/e2fsprogs/description
  29. This package contains essential ext2 filesystem utilities which consists of
  30. e2fsck, mke2fs and most of the other core ext2 filesystem utilities.
  31. endef
  32. define Package/libext2fs
  33. $(call Package/e2fsprogs/Default)
  34. SECTION:=libs
  35. CATEGORY:=Libraries
  36. TITLE:=ext2/3/4 filesystem library
  37. endef
  38. define Package/libext2fs/description
  39. libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
  40. endef
  41. define Package/tune2fs
  42. $(call Package/e2fsprogs)
  43. TITLE:=Ext2 Filesystem tune utility
  44. DEPENDS:= +e2fsprogs
  45. endef
  46. define Package/resize2fs
  47. $(call Package/e2fsprogs)
  48. TITLE:=Ext2 Filesystem resize utility
  49. DEPENDS:= +e2fsprogs
  50. endef
  51. define Package/badblocks
  52. $(call Package/e2fsprogs)
  53. TITLE:=Ext2 Filesystem badblocks utility
  54. DEPENDS:= +e2fsprogs
  55. endef
  56. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
  57. CONFIGURE_VARS += \
  58. ac_cv_lib_pthread_sem_init=no
  59. CONFIGURE_ARGS += \
  60. --disable-testio-debug \
  61. --enable-elf-shlibs \
  62. --disable-libuuid \
  63. --enable-libblkid \
  64. --disable-uuidd \
  65. --disable-tls \
  66. --disable-nls \
  67. --disable-rpath
  68. define Build/Prepare
  69. $(call Build/Prepare/Default)
  70. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  71. endef
  72. define Build/Compile
  73. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  74. BUILDCC="$(HOSTCC)" \
  75. CFLAGS="" \
  76. CPPFLAGS="" \
  77. LDFLAGS="" \
  78. subst
  79. $(MAKE) -C $(PKG_BUILD_DIR) \
  80. LDFLAGS=-Wl,--gc-sections \
  81. BUILDCC="$(HOSTCC)" \
  82. DESTDIR="$(PKG_INSTALL_DIR)" \
  83. LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
  84. all
  85. endef
  86. define Package/e2fsprogs/install
  87. $(INSTALL_DIR) $(1)/usr/sbin
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  89. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  90. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext2
  91. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext3
  92. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext4
  93. $(INSTALL_DIR) $(1)/usr/lib
  94. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
  95. $(INSTALL_DIR) $(1)/etc/init.d
  96. $(INSTALL_DIR) $(1)/lib/functions/fsck
  97. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  98. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  99. endef
  100. define Package/libcom_err/install
  101. endef
  102. define Package/libext2fs/install
  103. $(INSTALL_DIR) $(1)/usr/lib
  104. $(CP) \
  105. $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
  106. $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
  107. $(1)/usr/lib/
  108. endef
  109. define Package/libext2fs/install_lib
  110. $(INSTALL_DIR) $(1)/usr/lib
  111. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
  112. endef
  113. define Package/tune2fs/install
  114. $(INSTALL_DIR) $(1)/usr/sbin
  115. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  116. endef
  117. define Package/resize2fs/install
  118. $(INSTALL_DIR) $(1)/usr/sbin
  119. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  120. endef
  121. define Package/badblocks/install
  122. $(INSTALL_DIR) $(1)/usr/sbin
  123. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  124. endef
  125. $(eval $(call BuildPackage,e2fsprogs))
  126. $(eval $(call BuildPackage,libext2fs))
  127. $(eval $(call BuildPackage,tune2fs))
  128. $(eval $(call BuildPackage,resize2fs))
  129. $(eval $(call BuildPackage,badblocks))