Makefile 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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.3
  10. PKG_HASH:=ce8ef1bbb0d4730f170167284fda156ac9d6bf18db2750eb94af619a81b19927
  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. DEPENDS:=+libuuid
  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/tune2fs
  44. $(call Package/e2fsprogs)
  45. TITLE:=Ext2 Filesystem tune utility
  46. DEPENDS:= +e2fsprogs
  47. endef
  48. define Package/resize2fs
  49. $(call Package/e2fsprogs)
  50. TITLE:=Ext2 Filesystem resize utility
  51. DEPENDS:= +e2fsprogs
  52. endef
  53. define Package/badblocks
  54. $(call Package/e2fsprogs)
  55. TITLE:=Ext2 Filesystem badblocks utility
  56. DEPENDS:= +e2fsprogs
  57. endef
  58. define Package/dumpe2fs
  59. $(call Package/e2fsprogs)
  60. TITLE:=Ext2 Filesystem information dumping utility
  61. DEPENDS:= +e2fsprogs
  62. endef
  63. define Package/e2freefrag
  64. $(call Package/e2fsprogs)
  65. TITLE:=Ext2 Filesystem free space fragmentation information utility
  66. DEPENDS:= +e2fsprogs
  67. endef
  68. define Package/filefrag
  69. $(call Package/e2fsprogs)
  70. TITLE:=Ext2 Filesystem file fragmentation report utility
  71. DEPENDS:= +e2fsprogs
  72. endef
  73. define Package/debugfs
  74. $(call Package/e2fsprogs)
  75. TITLE:=Ext2 Filesystem debugger
  76. DEPENDS:= +e2fsprogs
  77. endef
  78. define Package/chattr
  79. $(call Package/e2fsprogs)
  80. TITLE:=Ext2 Filesystem chattr utility
  81. DEPENDS:= +e2fsprogs
  82. endef
  83. define Package/lsattr
  84. $(call Package/e2fsprogs)
  85. TITLE:=Ext2 Filesystem lsattr utility
  86. DEPENDS:= +e2fsprogs
  87. endef
  88. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
  89. CONFIGURE_VARS += \
  90. ac_cv_lib_pthread_sem_init=no
  91. CONFIGURE_ARGS += \
  92. --disable-testio-debug \
  93. --enable-elf-shlibs \
  94. --disable-libuuid \
  95. --enable-libblkid \
  96. --disable-uuidd \
  97. --disable-tls \
  98. --disable-nls \
  99. --disable-rpath
  100. define Build/Prepare
  101. $(call Build/Prepare/Default)
  102. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/config/
  103. endef
  104. define Build/Compile
  105. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/util \
  106. BUILDCC="$(HOSTCC)" \
  107. CFLAGS="" \
  108. CPPFLAGS="" \
  109. LDFLAGS="" \
  110. V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,) \
  111. subst
  112. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  113. LDFLAGS=-Wl,--gc-sections \
  114. BUILDCC="$(HOSTCC)" \
  115. DESTDIR="$(PKG_INSTALL_DIR)" \
  116. LIBBLKID="$(PKG_BUILD_DIR)/lib/libblkid.a -luuid" \
  117. ELF_OTHER_LIBS="$(TARGET_LDFLAGS) -luuid" \
  118. SYSLIBS="$(TARGET_LDFLAGS) -ldl -L$(PKG_BUILD_DIR)/lib/ -l:libcom_err.so.0.0" \
  119. V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1,) \
  120. all
  121. endef
  122. define Build/InstallDev
  123. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  124. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/ext2fs.pc $(1)/usr/lib/pkgconfig
  125. $(CP) $(PKG_BUILD_DIR)/lib/et/com_err.pc $(1)/usr/lib/pkgconfig
  126. $(INSTALL_DIR) $(1)/usr/lib
  127. $(CP) $(PKG_BUILD_DIR)/lib/libext2fs.{so,a}* $(1)/usr/lib
  128. $(CP) $(PKG_BUILD_DIR)/lib/libcom_err.{so,a}* $(1)/usr/lib
  129. $(INSTALL_DIR) $(1)/usr/include/ext2fs
  130. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/*.h $(1)/usr/include/ext2fs
  131. $(INSTALL_DIR) $(1)/usr/include/et
  132. $(CP) $(PKG_BUILD_DIR)/lib/et/*.h $(1)/usr/include/et
  133. endef
  134. define Package/e2fsprogs/conffiles
  135. /etc/e2fsck.conf
  136. endef
  137. define Package/e2fsprogs/install
  138. $(INSTALL_DIR) $(1)/usr/sbin
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2fsck $(1)/usr/sbin/
  140. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mke2fs $(1)/usr/sbin/
  141. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext2
  142. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext3
  143. $(LN) mke2fs $(1)/usr/sbin/mkfs.ext4
  144. $(LN) e2fsck $(1)/usr/sbin/fsck.ext2
  145. $(LN) e2fsck $(1)/usr/sbin/fsck.ext3
  146. $(LN) e2fsck $(1)/usr/sbin/fsck.ext4
  147. $(INSTALL_DIR) $(1)/usr/lib
  148. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libe2p.so.* $(1)/usr/lib/
  149. $(INSTALL_DIR) $(1)/etc/init.d
  150. $(INSTALL_DIR) $(1)/lib/functions/fsck
  151. $(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
  152. $(INSTALL_DATA) ./files/e2fsck.conf $(1)/etc/e2fsck.conf
  153. endef
  154. define Package/libcom_err/install
  155. endef
  156. define Package/libext2fs/install
  157. $(INSTALL_DIR) $(1)/usr/lib
  158. $(CP) \
  159. $(PKG_INSTALL_DIR)/usr/lib/libext2fs.so.* \
  160. $(PKG_INSTALL_DIR)/usr/lib/libcom_err.so.* \
  161. $(1)/usr/lib/
  162. endef
  163. define Package/libext2fs/install_lib
  164. $(INSTALL_DIR) $(1)/usr/lib
  165. $(CP) $(PKG_BUILD_DIR)/lib/ext2fs/libext2fs.a $(1)/usr/lib/libext2fs_pic.a
  166. endef
  167. define Package/tune2fs/install
  168. $(INSTALL_DIR) $(1)/usr/sbin
  169. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tune2fs $(1)/usr/sbin/
  170. $(LN) tune2fs $(1)/usr/sbin/findfs
  171. endef
  172. define Package/resize2fs/install
  173. $(INSTALL_DIR) $(1)/usr/sbin
  174. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/resize2fs $(1)/usr/sbin/
  175. endef
  176. define Package/badblocks/install
  177. $(INSTALL_DIR) $(1)/usr/sbin
  178. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/badblocks $(1)/usr/sbin/
  179. endef
  180. define Package/dumpe2fs/install
  181. $(INSTALL_DIR) $(1)/usr/sbin
  182. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dumpe2fs $(1)/usr/sbin/
  183. endef
  184. define Package/e2freefrag/install
  185. $(INSTALL_DIR) $(1)/usr/sbin
  186. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/e2freefrag $(1)/usr/sbin/
  187. endef
  188. define Package/filefrag/install
  189. $(INSTALL_DIR) $(1)/usr/sbin
  190. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/filefrag $(1)/usr/sbin/
  191. endef
  192. define Package/debugfs/install
  193. $(INSTALL_DIR) $(1)/usr/sbin
  194. $(INSTALL_DIR) $(1)/usr/lib
  195. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/debugfs $(1)/usr/sbin/
  196. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libss.so.* $(1)/usr/lib/
  197. endef
  198. define Package/chattr/install
  199. $(INSTALL_DIR) $(1)/usr/bin
  200. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chattr $(1)/usr/bin/
  201. endef
  202. define Package/lsattr/install
  203. $(INSTALL_DIR) $(1)/usr/bin
  204. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsattr $(1)/usr/bin/
  205. endef
  206. $(eval $(call BuildPackage,e2fsprogs))
  207. $(eval $(call BuildPackage,libext2fs))
  208. $(eval $(call BuildPackage,tune2fs))
  209. $(eval $(call BuildPackage,resize2fs))
  210. $(eval $(call BuildPackage,badblocks))
  211. $(eval $(call BuildPackage,dumpe2fs))
  212. $(eval $(call BuildPackage,e2freefrag))
  213. $(eval $(call BuildPackage,filefrag))
  214. $(eval $(call BuildPackage,debugfs))
  215. $(eval $(call BuildPackage,chattr))
  216. $(eval $(call BuildPackage,lsattr))