Makefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #
  2. # Copyright (C) 2006 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.39
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/e2fsprogs
  14. PKG_MD5SUM:=06f7806782e357797fad1d34b7ced0c6
  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. CONFIGURE_ARGS += \
  72. --enable-shared \
  73. --enable-static \
  74. --disable-rpath \
  75. --enable-elf-shlibs \
  76. --enable-dynamic-e2fsck
  77. define Build/Prepare
  78. $(call Build/Prepare/Default)
  79. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  80. endef
  81. define Build/Compile
  82. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  83. BUILDCC="$(HOSTCC)" \
  84. CFLAGS="" \
  85. CPPFLAGS="" \
  86. LDFLAGS="" \
  87. subst
  88. $(MAKE) -C $(PKG_BUILD_DIR) \
  89. BUILDCC="$(HOSTCC)" \
  90. DESTDIR="$(PKG_INSTALL_DIR)" \
  91. all install
  92. endef
  93. define Build/InstallDev
  94. $(MAKE) -C $(PKG_BUILD_DIR) \
  95. BUILDCC="$(HOSTCC)" \
  96. DESTDIR="$(1)" \
  97. install-libs
  98. endef
  99. define Package/e2fsprogs/install
  100. $(INSTALL_DIR) $(1)/usr/sbin
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  103. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  104. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  105. $(INSTALL_DIR) $(1)/usr/lib
  106. $(CP) $(foreach lib,com_err e2p ext2fs,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
  107. endef
  108. define Package/libuuid/install
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/
  111. endef
  112. define Package/uuidgen/install
  113. $(INSTALL_DIR) $(1)/usr/bin
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uuidgen $(1)/usr/bin/
  115. endef
  116. define Package/libblkid/install
  117. $(INSTALL_DIR) $(1)/usr/lib
  118. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/
  119. endef
  120. define Package/tune2fs/install
  121. $(INSTALL_DIR) $(1)/usr/sbin
  122. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  123. endef
  124. define Package/resize2fs/install
  125. $(INSTALL_DIR) $(1)/usr/sbin
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  127. endef
  128. $(eval $(call BuildPackage,e2fsprogs))
  129. $(eval $(call BuildPackage,libuuid))
  130. $(eval $(call BuildPackage,uuidgen))
  131. $(eval $(call BuildPackage,libblkid))
  132. $(eval $(call BuildPackage,tune2fs))
  133. $(eval $(call BuildPackage,resize2fs))