1
0

Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.12.0
  10. PKG_RELEASE:=3
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
  14. PKG_HASH:=e2124e4dffaba865d41495d817bcb924d096adaec67ff777b8c7da99aa13f696
  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. ABI_VERSION:=6
  46. endef
  47. CONFIGURE_ARGS += \
  48. --without-selinux \
  49. --without-blkid
  50. CONFIGURE_VARS += \
  51. ac_cv_file__git=no
  52. define Package/libf2fs/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) \
  55. $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so.* $(1)/usr/lib/
  56. endef
  57. define Package/mkf2fs/install
  58. $(INSTALL_DIR) $(1)/usr/sbin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.f2fs $(1)/usr/sbin
  60. endef
  61. define Package/f2fsck/install
  62. $(INSTALL_DIR) $(1)/usr/sbin
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.f2fs $(1)/usr/sbin
  64. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/defrag.f2fs
  65. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs
  66. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/sload.f2fs
  67. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/resize.f2fs
  68. endef
  69. define Package/f2fs-tools/install
  70. $(INSTALL_DIR) $(1)/usr/sbin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fstat $(1)/usr/sbin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin
  74. endef
  75. $(eval $(call BuildPackage,libf2fs))
  76. $(eval $(call BuildPackage,mkf2fs))
  77. $(eval $(call BuildPackage,f2fsck))
  78. $(eval $(call BuildPackage,f2fs-tools))