2
0

Makefile 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  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. ifneq ($(findstring "0.9.29",$(CONFIG_UCLIBC_VERSION)),"0.9.29")
  10. PKG_VERSION:=1.41.9
  11. PKG_MD5SUM:=52f60a9e19a02f142f5546f1b5681927
  12. else
  13. PKG_VERSION:=1.40.11
  14. PKG_MD5SUM:=004cea70d724fdc7f1a952dffe4c9db8
  15. endif
  16. PKG_RELEASE:=1
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  18. PKG_SOURCE_URL:=@SF/e2fsprogs
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/e2fsprogs/Default
  21. URL:=http://e2fsprogs.sourceforge.net/
  22. SUBMENU:=Filesystem
  23. endef
  24. define Package/e2fsprogs
  25. $(call Package/e2fsprogs/Default)
  26. SECTION:=utils
  27. CATEGORY:=Utilities
  28. TITLE:=Ext2/3/4 filesystem utilities
  29. DEPENDS:=+libblkid +libuuid +libext2fs +libpthread
  30. endef
  31. define Package/e2fsprogs/description
  32. This package contains essential ext2 filesystem utilities which consists of
  33. e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2
  34. filesystem utilities.
  35. endef
  36. define Package/libuuid
  37. $(call Package/e2fsprogs/Default)
  38. SECTION:=libs
  39. CATEGORY:=Libraries
  40. TITLE:=DCE compatible Universally Unique Identifier library
  41. endef
  42. define Package/libuuid/description
  43. Library for generating DCE compatible Universally Unique Identifiers.
  44. endef
  45. define Package/uuidgen
  46. $(call Package/e2fsprogs)
  47. DEPENDS:=libuuid
  48. TITLE:=Command line utility to create a new UUID value
  49. endef
  50. define Package/uuidgen/description
  51. uuidgen program creates a new universally unique identifier (UUID)
  52. using the libuuid library. The new UUID can reasonably be considered
  53. unique among all UUIDs created on the local system, and among UUIDs
  54. created on other systems in the past and in the future.
  55. endef
  56. define Package/libblkid
  57. $(call Package/e2fsprogs/Default)
  58. SECTION:=libs
  59. CATEGORY:=Libraries
  60. TITLE:=block device id library
  61. endef
  62. define Package/libblkid/description
  63. The blkid library which allows system programs like fsck and mount to
  64. quickly and easily find block devices by filesystem UUID and LABEL.
  65. endef
  66. define Package/libext2fs
  67. $(call Package/e2fsprogs/Default)
  68. SECTION:=libs
  69. CATEGORY:=Libraries
  70. TITLE:=ext2/3/4 filesystem library
  71. endef
  72. define Package/libext2fs/description
  73. libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
  74. endef
  75. define Package/tune2fs
  76. $(call Package/e2fsprogs)
  77. TITLE:=Ext2 Filesystem tune utility
  78. DEPENDS:=e2fsprogs
  79. endef
  80. define Package/resize2fs
  81. $(call Package/e2fsprogs)
  82. TITLE:=Ext2 Filesystem resize utility
  83. DEPENDS:=e2fsprogs
  84. endef
  85. define Package/badblocks
  86. $(call Package/e2fsprogs)
  87. TITLE:=Ext2 Filesystem badblocks utility
  88. DEPENDS:=e2fsprogs
  89. endef
  90. define Package/blkid
  91. $(call Package/e2fsprogs)
  92. TITLE:=Command-line utility to locate/print block device attributes
  93. DEPENDS:=libuuid libblkid
  94. endef
  95. CONFIGURE_ARGS += \
  96. --enable-shared \
  97. --enable-static \
  98. --disable-rpath \
  99. --enable-elf-shlibs \
  100. --enable-dynamic-e2fsck \
  101. --disable-tls
  102. define Build/Prepare
  103. $(call Build/Prepare/Default)
  104. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  105. endef
  106. define Build/Compile
  107. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  108. BUILDCC="$(HOSTCC)" \
  109. CFLAGS="" \
  110. CPPFLAGS="" \
  111. LDFLAGS="" \
  112. subst
  113. $(MAKE) -C $(PKG_BUILD_DIR) \
  114. BUILDCC="$(HOSTCC)" \
  115. DESTDIR="$(PKG_INSTALL_DIR)" \
  116. all install
  117. endef
  118. define Build/InstallDev
  119. $(MAKE) -C $(PKG_BUILD_DIR) \
  120. BUILDCC="$(HOSTCC)" \
  121. DESTDIR="$(1)" \
  122. install-libs
  123. $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
  124. BUILDCC="$(HOSTCC)" \
  125. DESTDIR="$(1)" \
  126. install
  127. endef
  128. define Package/e2fsprogs/install
  129. $(INSTALL_DIR) $(1)/usr/sbin
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  132. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  133. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  134. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
  135. $(INSTALL_DIR) $(1)/usr/lib
  136. $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
  137. $(INSTALL_DIR) $(1)/etc/init.d
  138. $(INSTALL_BIN) ./files/e2fsck.init $(1)/etc/init.d/e2fsck
  139. endef
  140. define Package/libuuid/install
  141. $(INSTALL_DIR) $(1)/usr/lib
  142. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
  143. endef
  144. define Package/uuidgen/install
  145. $(INSTALL_DIR) $(1)/usr/bin
  146. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
  147. endef
  148. define Package/libblkid/install
  149. $(INSTALL_DIR) $(1)/usr/lib
  150. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
  151. endef
  152. define Package/libext2fs/install
  153. $(INSTALL_DIR) $(1)/usr/lib
  154. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so* $(1)/usr/lib/
  155. endef
  156. define Package/tune2fs/install
  157. $(INSTALL_DIR) $(1)/usr/sbin
  158. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  159. endef
  160. define Package/resize2fs/install
  161. $(INSTALL_DIR) $(1)/usr/sbin
  162. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  163. endef
  164. define Package/badblocks/install
  165. $(INSTALL_DIR) $(1)/usr/sbin
  166. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  167. endef
  168. define Package/blkid/install
  169. $(INSTALL_DIR) $(1)/usr/sbin
  170. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
  171. endef
  172. $(eval $(call BuildPackage,e2fsprogs))
  173. $(eval $(call BuildPackage,libuuid))
  174. $(eval $(call BuildPackage,uuidgen))
  175. $(eval $(call BuildPackage,libblkid))
  176. $(eval $(call BuildPackage,libext2fs))
  177. $(eval $(call BuildPackage,tune2fs))
  178. $(eval $(call BuildPackage,resize2fs))
  179. $(eval $(call BuildPackage,badblocks))
  180. $(eval $(call BuildPackage,blkid))