Makefile 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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:=1
  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
  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/tune2fs
  72. $(call Package/e2fsprogs)
  73. TITLE:=Ext2 Filesystem tune utility
  74. DEPENDS:= +e2fsprogs
  75. endef
  76. define Package/resize2fs
  77. $(call Package/e2fsprogs)
  78. TITLE:=Ext2 Filesystem resize utility
  79. DEPENDS:= +e2fsprogs
  80. endef
  81. define Package/badblocks
  82. $(call Package/e2fsprogs)
  83. TITLE:=Ext2 Filesystem badblocks utility
  84. DEPENDS:= +e2fsprogs
  85. endef
  86. define Package/blkid
  87. $(call Package/e2fsprogs)
  88. TITLE:=Command-line utility to locate/print block device attributes
  89. DEPENDS:=+libuuid +libblkid
  90. endef
  91. TARGET_CFLAGS += $(FPIC)
  92. CONFIGURE_ARGS += \
  93. --enable-shared \
  94. --enable-static \
  95. --disable-rpath \
  96. --enable-elf-shlibs \
  97. --enable-dynamic-e2fsck \
  98. --disable-tls
  99. define Build/Prepare
  100. $(call Build/Prepare/Default)
  101. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  102. endef
  103. define Build/Compile
  104. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  105. BUILDCC="$(HOSTCC)" \
  106. CFLAGS="" \
  107. CPPFLAGS="" \
  108. LDFLAGS="" \
  109. subst
  110. $(MAKE) -C $(PKG_BUILD_DIR) \
  111. BUILDCC="$(HOSTCC)" \
  112. DESTDIR="$(PKG_INSTALL_DIR)" \
  113. all
  114. endef
  115. define Build/InstallDev
  116. $(MAKE) -C $(PKG_BUILD_DIR) \
  117. BUILDCC="$(HOSTCC)" \
  118. DESTDIR="$(1)" \
  119. install-libs
  120. $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
  121. BUILDCC="$(HOSTCC)" \
  122. DESTDIR="$(1)" \
  123. install
  124. endef
  125. define Package/e2fsprogs/install
  126. $(INSTALL_DIR) $(1)/usr/sbin
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  129. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  130. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  131. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
  132. $(INSTALL_DIR) $(1)/usr/lib
  133. $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
  134. $(INSTALL_DIR) $(1)/etc/init.d
  135. $(INSTALL_DIR) $(1)/lib/functions/fsck
  136. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  137. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  138. endef
  139. define Package/libuuid/install
  140. $(INSTALL_DIR) $(1)/usr/lib
  141. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
  142. endef
  143. define Package/uuidgen/install
  144. $(INSTALL_DIR) $(1)/usr/bin
  145. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
  146. endef
  147. define Package/libblkid/install
  148. $(INSTALL_DIR) $(1)/usr/lib
  149. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
  150. endef
  151. define Package/libext2fs/install
  152. $(INSTALL_DIR) $(1)/usr/lib
  153. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
  154. endef
  155. define Package/tune2fs/install
  156. $(INSTALL_DIR) $(1)/usr/sbin
  157. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  158. endef
  159. define Package/resize2fs/install
  160. $(INSTALL_DIR) $(1)/usr/sbin
  161. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  162. endef
  163. define Package/badblocks/install
  164. $(INSTALL_DIR) $(1)/usr/sbin
  165. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  166. endef
  167. define Package/blkid/install
  168. $(INSTALL_DIR) $(1)/usr/sbin
  169. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
  170. endef
  171. $(eval $(call BuildPackage,e2fsprogs))
  172. $(eval $(call BuildPackage,libuuid))
  173. $(eval $(call BuildPackage,uuidgen))
  174. $(eval $(call BuildPackage,libblkid))
  175. $(eval $(call BuildPackage,libext2fs))
  176. $(eval $(call BuildPackage,tune2fs))
  177. $(eval $(call BuildPackage,resize2fs))
  178. $(eval $(call BuildPackage,badblocks))
  179. $(eval $(call BuildPackage,blkid))