2
0

Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  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:=f2fs-tools
  9. PKG_VERSION:=1.7.0
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPLv2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
  14. PKG_HASH:=33d454c2e95aabef5659949c4fff15f6c9877b48349e64411de502bc62b0cbd4
  15. PKG_FIXUP:=autoreconf
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/f2fs-tools/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Filesystem
  24. DEPENDS:=+libf2fs
  25. URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
  26. endef
  27. define Package/mkf2fs
  28. $(Package/f2fs-tools/Default)
  29. TITLE:=Utility for creating a Flash-Friendly File System (F2FS)
  30. endef
  31. define Package/f2fsck
  32. $(Package/f2fs-tools/Default)
  33. TITLE:=Utility for checking/repairing a Flash-Friendly File System (F2FS)
  34. endef
  35. define Package/f2fs-tools
  36. $(Package/f2fs-tools/Default)
  37. TITLE:=Tools for Flash-Friendly File System (F2FS)
  38. DEPENDS += +mkf2fs +f2fsck
  39. endef
  40. define Package/libf2fs
  41. SECTION:=libs
  42. CATEGORY:=Libraries
  43. TITLE:=Library for Flash-Friendly File System (F2FS) tools
  44. DEPENDS:=+libuuid
  45. endef
  46. define Package/libf2fs/install
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) \
  49. $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
  50. endef
  51. define Package/mkf2fs/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.f2fs $(1)/usr/sbin
  54. endef
  55. define Package/f2fsck/install
  56. $(INSTALL_DIR) $(1)/usr/sbin
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.f2fs $(1)/usr/sbin
  58. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/defrag.f2fs
  59. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs
  60. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/sload.f2fs
  61. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/resize.f2fs
  62. endef
  63. define Package/f2fs-tools/install
  64. $(INSTALL_DIR) $(1)/usr/sbin
  65. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fstat $(1)/usr/sbin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin
  68. endef
  69. $(eval $(call BuildPackage,libf2fs))
  70. $(eval $(call BuildPackage,mkf2fs))
  71. $(eval $(call BuildPackage,f2fsck))
  72. $(eval $(call BuildPackage,f2fs-tools))