Makefile 5.9 KB

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