Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #
  2. # Copyright (C) 2006-2012 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.42.8
  10. PKG_MD5SUM:=8ef664b6eb698aa6b733df59b17b9ed4
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=@SF/e2fsprogs
  14. PKG_BUILD_DEPENDS:=util-linux
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/e2fsprogs/Default
  18. URL:=http://e2fsprogs.sourceforge.net/
  19. SUBMENU:=Filesystem
  20. endef
  21. define Package/e2fsprogs
  22. $(call Package/e2fsprogs/Default)
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=Ext2/3/4 filesystem utilities
  26. DEPENDS:=+libuuid +libext2fs
  27. endef
  28. define Package/e2fsprogs/description
  29. This package contains essential ext2 filesystem utilities which consists of
  30. e2fsck, mke2fs, tune2fs, and most of the other core ext2
  31. filesystem utilities.
  32. endef
  33. define Package/libext2fs
  34. $(call Package/e2fsprogs/Default)
  35. SECTION:=libs
  36. CATEGORY:=Libraries
  37. TITLE:=ext2/3/4 filesystem library
  38. endef
  39. define Package/libext2fs/description
  40. libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
  41. endef
  42. define Package/tune2fs
  43. $(call Package/e2fsprogs)
  44. TITLE:=Ext2 Filesystem tune utility
  45. DEPENDS:= +e2fsprogs
  46. endef
  47. define Package/e4defrag
  48. $(call Package/e2fsprogs)
  49. TITLE:=Ext4 Filesystem defrag utility
  50. DEPENDS:= +e2fsprogs
  51. endef
  52. define Package/resize2fs
  53. $(call Package/e2fsprogs)
  54. TITLE:=Ext2 Filesystem resize utility
  55. DEPENDS:= +e2fsprogs
  56. endef
  57. define Package/badblocks
  58. $(call Package/e2fsprogs)
  59. TITLE:=Ext2 Filesystem badblocks utility
  60. DEPENDS:= +e2fsprogs
  61. endef
  62. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
  63. CONFIGURE_VARS += \
  64. ac_cv_lib_pthread_sem_init=no
  65. CONFIGURE_ARGS += \
  66. --disable-testio-debug \
  67. --enable-elf-shlibs \
  68. --disable-libuuid \
  69. --enable-libblkid \
  70. --disable-uuidd \
  71. --disable-tls \
  72. --disable-nls \
  73. --disable-rpath
  74. define Build/Prepare
  75. $(call Build/Prepare/Default)
  76. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  77. endef
  78. define Build/Compile
  79. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  80. BUILDCC="$(HOSTCC)" \
  81. CFLAGS="" \
  82. CPPFLAGS="" \
  83. LDFLAGS="" \
  84. subst
  85. $(MAKE) -C $(PKG_BUILD_DIR) \
  86. LDFLAGS=-Wl,--gc-sections \
  87. BUILDCC="$(HOSTCC)" \
  88. DESTDIR="$(PKG_INSTALL_DIR)" \
  89. LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
  90. all
  91. endef
  92. define Package/e2fsprogs/install
  93. $(INSTALL_DIR) $(1)/usr/sbin
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  95. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  96. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  97. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  98. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
  99. $(INSTALL_DIR) $(1)/usr/lib
  100. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
  101. $(INSTALL_DIR) $(1)/etc/init.d
  102. $(INSTALL_DIR) $(1)/lib/functions/fsck
  103. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  104. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  105. endef
  106. define Package/libcom_err/install
  107. endef
  108. define Package/libext2fs/install
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. $(CP) \
  111. $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
  112. $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
  113. $(1)/usr/lib/
  114. endef
  115. define Package/libext2fs/install_lib
  116. $(INSTALL_DIR) $(1)/usr/lib
  117. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
  118. endef
  119. define Package/tune2fs/install
  120. $(INSTALL_DIR) $(1)/usr/sbin
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  122. endef
  123. define Package/e4defrag/install
  124. $(INSTALL_DIR) $(1)/usr/sbin
  125. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e4defrag $(1)/usr/sbin/
  126. endef
  127. define Package/resize2fs/install
  128. $(INSTALL_DIR) $(1)/usr/sbin
  129. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  130. endef
  131. define Package/badblocks/install
  132. $(INSTALL_DIR) $(1)/usr/sbin
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  134. endef
  135. $(eval $(call BuildPackage,e2fsprogs))
  136. $(eval $(call BuildPackage,libext2fs))
  137. $(eval $(call BuildPackage,tune2fs))
  138. $(eval $(call BuildPackage,e4defrag))
  139. $(eval $(call BuildPackage,resize2fs))
  140. $(eval $(call BuildPackage,badblocks))