Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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:=+libblkid +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. DEPENDS:=+libcom_err
  36. SECTION:=libs
  37. CATEGORY:=Libraries
  38. TITLE:=ext2/3/4 filesystem library
  39. endef
  40. define Package/libext2fs/description
  41. libext2fs is a library which can access ext2, ext3 and ext4 filesystems.
  42. endef
  43. define Package/libcom_err
  44. $(call Package/e2fsprogs/Default)
  45. DEPENDS:=+libpthread
  46. SECTION:=libs
  47. CATEGORY:=Libraries
  48. TITLE:=Common error description library
  49. endef
  50. define Package/libcom_err/description
  51. libcom_err is a library providing common error descriptions
  52. endef
  53. define Package/tune2fs
  54. $(call Package/e2fsprogs)
  55. TITLE:=Ext2 Filesystem tune utility
  56. DEPENDS:= +e2fsprogs
  57. endef
  58. define Package/resize2fs
  59. $(call Package/e2fsprogs)
  60. TITLE:=Ext2 Filesystem resize utility
  61. DEPENDS:= +e2fsprogs
  62. endef
  63. define Package/badblocks
  64. $(call Package/e2fsprogs)
  65. TITLE:=Ext2 Filesystem badblocks utility
  66. DEPENDS:= +e2fsprogs
  67. endef
  68. TARGET_CFLAGS += $(FPIC)
  69. CONFIGURE_ARGS += \
  70. --enable-elf-shlibs \
  71. --disable-libuuid \
  72. --disable-libblkid \
  73. --disable-uuidd \
  74. --disable-tls \
  75. --disable-nls \
  76. --disable-rpath
  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
  92. endef
  93. define Build/InstallDev
  94. $(MAKE) -C $(PKG_BUILD_DIR) \
  95. BUILDCC="$(HOSTCC)" \
  96. DESTDIR="$(1)" \
  97. install-libs
  98. $(MAKE) -C $(PKG_BUILD_DIR)/lib/ext2fs \
  99. BUILDCC="$(HOSTCC)" \
  100. DESTDIR="$(1)" \
  101. install
  102. endef
  103. define Package/e2fsprogs/install
  104. $(INSTALL_DIR) $(1)/usr/sbin
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  107. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext2
  108. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext3
  109. ln -sf mke2fs $(1)/usr/sbin/mkfs.ext4
  110. $(INSTALL_DIR) $(1)/usr/lib
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
  112. $(INSTALL_DIR) $(1)/etc/init.d
  113. $(INSTALL_DIR) $(1)/lib/functions/fsck
  114. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  115. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  116. endef
  117. define Package/libcom_err/install
  118. $(INSTALL_DIR) $(1)/usr/lib
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* $(1)/usr/lib/
  120. endef
  121. define Package/libext2fs/install
  122. $(INSTALL_DIR) $(1)/usr/lib
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* $(1)/usr/lib/
  124. endef
  125. define Package/tune2fs/install
  126. $(INSTALL_DIR) $(1)/usr/sbin
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  128. endef
  129. define Package/resize2fs/install
  130. $(INSTALL_DIR) $(1)/usr/sbin
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  132. endef
  133. define Package/badblocks/install
  134. $(INSTALL_DIR) $(1)/usr/sbin
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  136. endef
  137. $(eval $(call BuildPackage,e2fsprogs))
  138. $(eval $(call BuildPackage,libext2fs))
  139. $(eval $(call BuildPackage,libcom_err))
  140. $(eval $(call BuildPackage,tune2fs))
  141. $(eval $(call BuildPackage,resize2fs))
  142. $(eval $(call BuildPackage,badblocks))