You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.1 KiB

  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.4.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_MD5SUM:=be9bfdddf3e5fd5e701a88d0b388dc26
  15. PKG_FIXUP:=autoreconf
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/f2fs-tools
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Filesystem
  24. TITLE:=Tools for Flash-Friendly File System (F2FS)
  25. DEPENDS:=+libuuid +libf2fs
  26. URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
  27. MENU:=1
  28. endef
  29. define Package/libf2fs
  30. $(call Package/lxc/Default)
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. TITLE:=Library for Flash-Friendly File System (F2FS) tools
  34. DEPENDS:=
  35. endef
  36. define Package/f2fs-tools/config
  37. source "$(SOURCE)/Config.in"
  38. endef
  39. define Package/libf2fs/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
  42. endef
  43. define Package/f2fs-tools/install
  44. $(INSTALL_DIR) $(1)/usr/sbin
  45. ifeq ($(CONFIG_F2FS_UTILS_f2fstat),y)
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/f2fstat $(1)/usr/sbin
  47. endif
  48. ifeq ($(CONFIG_F2FS_UTILS_fibmap_f2fs),y)
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/fibmap.f2fs $(1)/usr/sbin
  50. endif
  51. ifeq ($(CONFIG_F2FS_UTILS_fsck_f2fs),y)
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/fsck.f2fs $(1)/usr/sbin
  53. endif
  54. ifeq ($(CONFIG_F2FS_UTILS_dump_f2fs),y)
  55. ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs
  56. endif
  57. ifeq ($(CONFIG_F2FS_UTILS_mkfs_f2fs),y)
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.f2fs $(1)/usr/sbin
  59. endif
  60. endef
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/include
  63. $(CP) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libf2fs.a $(1)/usr/lib/
  67. endef
  68. $(eval $(call BuildPackage,libf2fs))
  69. $(eval $(call BuildPackage,f2fs-tools))