Makefile 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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:=1
  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
  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/tune2fs
  62. $(call Package/e2fsprogs)
  63. TITLE:=Ext2 Filesystem tune utility
  64. DEPENDS:=e2fsprogs
  65. endef
  66. define Package/resize2fs
  67. $(call Package/e2fsprogs)
  68. TITLE:=Ext2 Filesystem resize utility
  69. DEPENDS:=e2fsprogs
  70. endef
  71. define Package/badblocks
  72. $(call Package/e2fsprogs)
  73. TITLE:=Ext2 Filesystem badblocks utility
  74. DEPENDS:=e2fsprogs
  75. endef
  76. CONFIGURE_ARGS += \
  77. --enable-shared \
  78. --enable-static \
  79. --disable-rpath \
  80. --enable-elf-shlibs \
  81. --enable-dynamic-e2fsck \
  82. --disable-tls
  83. define Build/Prepare
  84. $(call Build/Prepare/Default)
  85. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  86. endef
  87. define Build/Compile
  88. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  89. BUILDCC="$(HOSTCC)" \
  90. CFLAGS="" \
  91. CPPFLAGS="" \
  92. LDFLAGS="" \
  93. subst
  94. $(MAKE) -C $(PKG_BUILD_DIR) \
  95. BUILDCC="$(HOSTCC)" \
  96. DESTDIR="$(PKG_INSTALL_DIR)" \
  97. all install
  98. endef
  99. define Build/InstallDev
  100. $(MAKE) -C $(PKG_BUILD_DIR) \
  101. BUILDCC="$(HOSTCC)" \
  102. DESTDIR="$(1)" \
  103. install-libs
  104. endef
  105. define Package/e2fsprogs/install
  106. $(INSTALL_DIR) $(1)/usr/sbin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  109. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  110. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  111. $(INSTALL_DIR) $(1)/usr/lib
  112. $(CP) $(foreach lib,com_err e2p ext2fs,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
  113. endef
  114. define Package/libuuid/install
  115. $(INSTALL_DIR) $(1)/usr/lib
  116. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
  117. endef
  118. define Package/uuidgen/install
  119. $(INSTALL_DIR) $(1)/usr/bin
  120. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
  121. endef
  122. define Package/libblkid/install
  123. $(INSTALL_DIR) $(1)/usr/lib
  124. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
  125. endef
  126. define Package/tune2fs/install
  127. $(INSTALL_DIR) $(1)/usr/sbin
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  129. endef
  130. define Package/resize2fs/install
  131. $(INSTALL_DIR) $(1)/usr/sbin
  132. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  133. endef
  134. define Package/badblocks/install
  135. $(INSTALL_DIR) $(1)/usr/sbin
  136. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  137. endef
  138. $(eval $(call BuildPackage,e2fsprogs))
  139. $(eval $(call BuildPackage,libuuid))
  140. $(eval $(call BuildPackage,uuidgen))
  141. $(eval $(call BuildPackage,libblkid))
  142. $(eval $(call BuildPackage,tune2fs))
  143. $(eval $(call BuildPackage,resize2fs))
  144. $(eval $(call BuildPackage,badblocks))