Makefile 5.2 KB

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