Makefile 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. #
  2. # Copyright (C) 2006-2014 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.43.1
  10. PKG_MD5SUM:=1775f3f0eed9dee1c5f39e08d1964a97
  11. PKG_RELEASE:=2
  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. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/e2fsprogs/Default
  19. URL:=http://e2fsprogs.sourceforge.net/
  20. SUBMENU:=Filesystem
  21. endef
  22. define Package/e2fsprogs
  23. $(call Package/e2fsprogs/Default)
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. TITLE:=Ext2/3/4 filesystem utilities
  27. DEPENDS:=+libuuid +libext2fs
  28. endef
  29. define Package/e2fsprogs/description
  30. This package contains essential ext2 filesystem utilities which consists of
  31. e2fsck, mke2fs and most of the other core ext2 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. define Package/dumpe2fs
  58. $(call Package/e2fsprogs)
  59. TITLE:=Ext2 Filesystem information dumping utility
  60. DEPENDS:= +e2fsprogs
  61. endef
  62. define Package/e2freefrag
  63. $(call Package/e2fsprogs)
  64. TITLE:=Ext2 Filesystem free space fragmentation information utility
  65. DEPENDS:= +e2fsprogs
  66. endef
  67. define Package/filefrag
  68. $(call Package/e2fsprogs)
  69. TITLE:=Ext2 Filesystem file fragmentation report utility
  70. DEPENDS:= +e2fsprogs
  71. endef
  72. define Package/debugfs
  73. $(call Package/e2fsprogs)
  74. TITLE:=Ext2 Filesystem debugger
  75. DEPENDS:= +e2fsprogs
  76. endef
  77. define Package/chattr
  78. $(call Package/e2fsprogs)
  79. TITLE:=Ext2 Filesystem chattr utility
  80. DEPENDS:= +e2fsprogs
  81. endef
  82. define Package/lsattr
  83. $(call Package/e2fsprogs)
  84. TITLE:=Ext2 Filesystem lsattr utility
  85. DEPENDS:= +e2fsprogs
  86. endef
  87. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
  88. CONFIGURE_VARS += \
  89. ac_cv_lib_pthread_sem_init=no
  90. CONFIGURE_ARGS += \
  91. --disable-testio-debug \
  92. --enable-elf-shlibs \
  93. --disable-libuuid \
  94. --enable-libblkid \
  95. --disable-uuidd \
  96. --disable-tls \
  97. --disable-nls \
  98. --disable-rpath
  99. define Build/Prepare
  100. $(call Build/Prepare/Default)
  101. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  102. endef
  103. define Build/Compile
  104. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/util \
  105. BUILD_CC="$(HOSTCC)" \
  106. CFLAGS="" \
  107. CPPFLAGS="" \
  108. LDFLAGS="" \
  109. subst
  110. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  111. LDFLAGS=-Wl,--gc-sections \
  112. BUILD_CC="$(HOSTCC)" \
  113. DESTDIR="$(PKG_INSTALL_DIR)" \
  114. LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
  115. all
  116. endef
  117. define Build/InstallDev
  118. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  119. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/ext2fs.pc $(1)/usr/lib/pkgconfig
  120. $(CP) $(PKG_BUILD_DIR)/lib/et/com_err.pc $(1)/usr/lib/pkgconfig
  121. $(INSTALL_DIR) $(1)/usr/lib
  122. $(CP) $(PKG_BUILD_DIR)/lib/libext2fs.{so,a}* $(1)/usr/lib
  123. $(CP) $(PKG_BUILD_DIR)/lib/libcom_err.{so,a}* $(1)/usr/lib
  124. $(INSTALL_DIR) $(1)/usr/include/ext2fs
  125. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/*.h $(1)/usr/include/ext2fs
  126. $(INSTALL_DIR) $(1)/usr/include/et
  127. $(CP) $(PKG_BUILD_DIR)/lib/et/*.h $(1)/usr/include/et
  128. endef
  129. define Package/e2fsprogs/conffiles
  130. /etc/e2fsck.conf
  131. endef
  132. define Package/e2fsprogs/install
  133. $(INSTALL_DIR) $(1)/usr/sbin
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  136. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext2
  137. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext3
  138. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext4
  139. $(LN) e2fsck $(1)/usr/sbin/fsck.ext2
  140. $(LN) e2fsck $(1)/usr/sbin/fsck.ext3
  141. $(LN) e2fsck $(1)/usr/sbin/fsck.ext4
  142. $(INSTALL_DIR) $(1)/usr/lib
  143. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
  144. $(INSTALL_DIR) $(1)/etc/init.d
  145. $(INSTALL_DIR) $(1)/lib/functions/fsck
  146. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  147. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  148. endef
  149. define Package/libcom_err/install
  150. endef
  151. define Package/libext2fs/install
  152. $(INSTALL_DIR) $(1)/usr/lib
  153. $(CP) \
  154. $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
  155. $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
  156. $(1)/usr/lib/
  157. endef
  158. define Package/libext2fs/install_lib
  159. $(INSTALL_DIR) $(1)/usr/lib
  160. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
  161. endef
  162. define Package/tune2fs/install
  163. $(INSTALL_DIR) $(1)/usr/sbin
  164. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  165. $(LN) tune2fs $(1)/usr/sbin/findfs
  166. endef
  167. define Package/resize2fs/install
  168. $(INSTALL_DIR) $(1)/usr/sbin
  169. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  170. endef
  171. define Package/badblocks/install
  172. $(INSTALL_DIR) $(1)/usr/sbin
  173. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  174. endef
  175. define Package/dumpe2fs/install
  176. $(INSTALL_DIR) $(1)/usr/sbin
  177. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dumpe2fs $(1)/usr/sbin/
  178. endef
  179. define Package/e2freefrag/install
  180. $(INSTALL_DIR) $(1)/usr/sbin
  181. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2freefrag $(1)/usr/sbin/
  182. endef
  183. define Package/filefrag/install
  184. $(INSTALL_DIR) $(1)/usr/sbin
  185. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/filefrag $(1)/usr/sbin/
  186. endef
  187. define Package/debugfs/install
  188. $(INSTALL_DIR) $(1)/usr/sbin
  189. $(INSTALL_DIR) $(1)/usr/lib
  190. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/debugfs $(1)/usr/sbin/
  191. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libss.so.* $(1)/usr/lib/
  192. endef
  193. define Package/chattr/install
  194. $(INSTALL_DIR) $(1)/usr/bin
  195. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chattr $(1)/usr/bin/
  196. endef
  197. define Package/lsattr/install
  198. $(INSTALL_DIR) $(1)/usr/bin
  199. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsattr $(1)/usr/bin/
  200. endef
  201. $(eval $(call BuildPackage,e2fsprogs))
  202. $(eval $(call BuildPackage,libext2fs))
  203. $(eval $(call BuildPackage,tune2fs))
  204. $(eval $(call BuildPackage,resize2fs))
  205. $(eval $(call BuildPackage,badblocks))
  206. $(eval $(call BuildPackage,dumpe2fs))
  207. $(eval $(call BuildPackage,e2freefrag))
  208. $(eval $(call BuildPackage,filefrag))
  209. $(eval $(call BuildPackage,debugfs))
  210. $(eval $(call BuildPackage,chattr))
  211. $(eval $(call BuildPackage,lsattr))