f2fs-tools: update to latest and split up tools 3373/head
authorAlberto Bursi <starshipeleven@outlook.com>
Sat, 22 Oct 2016 17:00:21 +0000 (19:00 +0200)
committerGitHub <noreply@github.com>
Sat, 22 Oct 2016 17:00:21 +0000 (19:00 +0200)
I cloned the makefile from LEDE's f2fs-utils package https://github.com/lede-project/source/blob/master/package/utils/f2fs-tools/Makefile
Fixes issue https://github.com/openwrt/packages/issues/1848

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
utils/f2fs-tools/Makefile

index 62d51556db0ee6eb570b9fcb1f36938a6dce7962..6a39bc72f639a9c67ed7fe8bd48c26ff19bba778 100644 (file)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=f2fs-tools
-PKG_VERSION:=1.4.0
+PKG_VERSION:=1.7.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPLv2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
-PKG_MD5SUM:=be9bfdddf3e5fd5e701a88d0b388dc26
+PKG_MD5SUM:=9db22274264f0c88dbee012f257917b1
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
@@ -25,65 +25,66 @@ PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/f2fs-tools
+define Package/f2fs-tools/Default
   SECTION:=utils
   CATEGORY:=Utilities
   SUBMENU:=Filesystem
-  TITLE:=Tools for Flash-Friendly File System (F2FS)
-  DEPENDS:=+libuuid +libf2fs
+  DEPENDS:=+libf2fs
   URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
-  MENU:=1
+endef
+
+define Package/mkf2fs
+  $(Package/f2fs-tools/Default)
+  TITLE:=Utility for creating a Flash-Friendly File System (F2FS)
+endef
+
+define Package/f2fsck
+  $(Package/f2fs-tools/Default)
+  TITLE:=Utility for checking/repairing a Flash-Friendly File System (F2FS)
+endef
+
+define Package/f2fs-tools
+  $(Package/f2fs-tools/Default)
+  TITLE:=Tools for Flash-Friendly File System (F2FS)
+  DEPENDS += +mkf2fs +f2fsck
 endef
 
 define Package/libf2fs
-  $(call Package/lxc/Default)
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Library for Flash-Friendly File System (F2FS) tools
-  DEPENDS:=
-endef
-
-define Package/f2fs-tools/config
-  source "$(SOURCE)/Config.in"
+  DEPENDS:=+libuuid
 endef
 
 define Package/libf2fs/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
 endef
 
-define Package/f2fs-tools/install
+define Package/mkf2fs/install
        $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.f2fs $(1)/usr/sbin
+endef
 
-ifeq ($(CONFIG_F2FS_UTILS_f2fstat),y)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/f2fstat $(1)/usr/sbin
-endif
-
-ifeq ($(CONFIG_F2FS_UTILS_fibmap_f2fs),y)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/fibmap.f2fs $(1)/usr/sbin
-endif
-
-ifeq ($(CONFIG_F2FS_UTILS_fsck_f2fs),y)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/fsck.f2fs $(1)/usr/sbin
-endif
+define Package/f2fsck/install
+       $(INSTALL_DIR) $(1)/usr/sbin
 
-ifeq ($(CONFIG_F2FS_UTILS_dump_f2fs),y)
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.f2fs $(1)/usr/sbin
+       ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/defrag.f2fs
        ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs
-endif
-
-ifeq ($(CONFIG_F2FS_UTILS_mkfs_f2fs),y)
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mkfs.f2fs $(1)/usr/sbin
-endif
-
+       ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/sload.f2fs
+       ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/resize.f2fs
 endef
 
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/include
-       $(CP) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libf2fs.a $(1)/usr/lib/
+define Package/f2fs-tools/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fstat $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin
 endef
 
 $(eval $(call BuildPackage,libf2fs))
+$(eval $(call BuildPackage,mkf2fs))
+$(eval $(call BuildPackage,f2fsck))
 $(eval $(call BuildPackage,f2fs-tools))