Makefile 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. #
  2. # Copyright (C) 2006-2008 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.11
  10. PKG_MD5SUM:=fb507a40c2706bc38306f150d069e345
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/e2fsprogs
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/e2fsprogs/Default
  16. URL:=http://e2fsprogs.sourceforge.net/
  17. SUBMENU:=Filesystem
  18. endef
  19. define Package/e2fsprogs
  20. $(call Package/e2fsprogs/Default)
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Ext2/3/4 filesystem utilities
  24. DEPENDS:=+libblkid +libuuid +libext2fs +libpthread
  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/3/4 filesystem library
  66. endef
  67. define Package/libext2fs/description
  68. libext2fs is a library which can access ext2, ext3 and ext4 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:=+libuuid +libblkid
  89. endef
  90. TARGET_CFLAGS += $(FPIC)
  91. CONFIGURE_ARGS += \
  92. --enable-shared \
  93. --enable-static \
  94. --disable-rpath \
  95. --enable-elf-shlibs \
  96. --enable-dynamic-e2fsck \
  97. --disable-tls
  98. define Build/Prepare
  99. $(call Build/Prepare/Default)
  100. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  101. endef
  102. define Build/Compile
  103. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  104. BUILDCC="$(HOSTCC)" \
  105. CFLAGS="" \
  106. CPPFLAGS="" \
  107. LDFLAGS="" \
  108. subst
  109. $(MAKE) -C $(PKG_BUILD_DIR) \
  110. BUILDCC="$(HOSTCC)" \
  111. DESTDIR="$(PKG_INSTALL_DIR)" \
  112. all install
  113. endef
  114. define Build/InstallDev
  115. $(MAKE) -C $(PKG_BUILD_DIR) \
  116. BUILDCC="$(HOSTCC)" \
  117. DESTDIR="$(1)" \
  118. install-libs
  119. $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
  120. BUILDCC="$(HOSTCC)" \
  121. DESTDIR="$(1)" \
  122. install
  123. endef
  124. define Package/e2fsprogs/install
  125. $(INSTALL_DIR) $(1)/usr/sbin
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  128. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  129. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  130. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
  131. $(INSTALL_DIR) $(1)/usr/lib
  132. $(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
  133. $(INSTALL_DIR) $(1)/etc/init.d
  134. $(INSTALL_DIR) $(1)/lib/functions/fsck
  135. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  136. endef
  137. define Package/libuuid/install
  138. $(INSTALL_DIR) $(1)/usr/lib
  139. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
  140. endef
  141. define Package/uuidgen/install
  142. $(INSTALL_DIR) $(1)/usr/bin
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
  144. endef
  145. define Package/libblkid/install
  146. $(INSTALL_DIR) $(1)/usr/lib
  147. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
  148. endef
  149. define Package/libext2fs/install
  150. $(INSTALL_DIR) $(1)/usr/lib
  151. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
  152. endef
  153. define Package/tune2fs/install
  154. $(INSTALL_DIR) $(1)/usr/sbin
  155. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  156. endef
  157. define Package/resize2fs/install
  158. $(INSTALL_DIR) $(1)/usr/sbin
  159. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  160. endef
  161. define Package/badblocks/install
  162. $(INSTALL_DIR) $(1)/usr/sbin
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  164. endef
  165. define Package/blkid/install
  166. $(INSTALL_DIR) $(1)/usr/sbin
  167. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
  168. endef
  169. $(eval $(call BuildPackage,e2fsprogs))
  170. $(eval $(call BuildPackage,libuuid))
  171. $(eval $(call BuildPackage,uuidgen))
  172. $(eval $(call BuildPackage,libblkid))
  173. $(eval $(call BuildPackage,libext2fs))
  174. $(eval $(call BuildPackage,tune2fs))
  175. $(eval $(call BuildPackage,resize2fs))
  176. $(eval $(call BuildPackage,badblocks))
  177. $(eval $(call BuildPackage,blkid))