Makefile 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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.4
  10. PKG_MD5SUM:=b6e296f210d642361b7394437ff0f318
  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/resize2fs
  48. $(call Package/e2fsprogs)
  49. TITLE:=Ext2 Filesystem resize utility
  50. DEPENDS:= +e2fsprogs
  51. endef
  52. define Package/badblocks
  53. $(call Package/e2fsprogs)
  54. TITLE:=Ext2 Filesystem badblocks utility
  55. DEPENDS:= +e2fsprogs
  56. endef
  57. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
  58. CONFIGURE_VARS += \
  59. ac_cv_lib_pthread_sem_init=no
  60. CONFIGURE_ARGS += \
  61. --disable-testio-debug \
  62. --enable-elf-shlibs \
  63. --disable-libuuid \
  64. --enable-libblkid \
  65. --disable-uuidd \
  66. --disable-tls \
  67. --disable-nls \
  68. --disable-rpath
  69. define Build/Prepare
  70. $(call Build/Prepare/Default)
  71. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  72. endef
  73. define Build/Compile
  74. $(MAKE) -C $(PKG_BUILD_DIR)/util \
  75. BUILDCC="$(HOSTCC)" \
  76. CFLAGS="" \
  77. CPPFLAGS="" \
  78. LDFLAGS="" \
  79. subst
  80. $(MAKE) -C $(PKG_BUILD_DIR) \
  81. LDFLAGS=-Wl,--gc-sections \
  82. BUILDCC="$(HOSTCC)" \
  83. DESTDIR="$(PKG_INSTALL_DIR)" \
  84. LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
  85. all
  86. endef
  87. define Package/e2fsprogs/install
  88. $(INSTALL_DIR) $(1)/usr/sbin
  89. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  91. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  92. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  93. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
  96. $(INSTALL_DIR) $(1)/etc/init.d
  97. $(INSTALL_DIR) $(1)/lib/functions/fsck
  98. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  99. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  100. endef
  101. define Package/libcom_err/install
  102. endef
  103. define Package/libext2fs/install
  104. $(INSTALL_DIR) $(1)/usr/lib
  105. $(CP) \
  106. $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
  107. $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
  108. $(1)/usr/lib/
  109. endef
  110. define Package/libext2fs/install_lib
  111. $(INSTALL_DIR) $(1)/usr/lib
  112. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
  113. endef
  114. define Package/tune2fs/install
  115. $(INSTALL_DIR) $(1)/usr/sbin
  116. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  117. endef
  118. define Package/resize2fs/install
  119. $(INSTALL_DIR) $(1)/usr/sbin
  120. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  121. endef
  122. define Package/badblocks/install
  123. $(INSTALL_DIR) $(1)/usr/sbin
  124. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  125. endef
  126. $(eval $(call BuildPackage,e2fsprogs))
  127. $(eval $(call BuildPackage,libext2fs))
  128. $(eval $(call BuildPackage,tune2fs))
  129. $(eval $(call BuildPackage,resize2fs))
  130. $(eval $(call BuildPackage,badblocks))