Makefile 5.2 KB

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