diff mbox series

[1/1] package/partclone: new package

Message ID 20250712153032.14697-1-dev@matt-silva.com
State New
Headers show
Series [1/1] package/partclone: new package | expand

Commit Message

Matt Silva July 12, 2025, 3:30 p.m. UTC
Partclone provides utilities to back up and restore used blocks of a
partition and it is designed for higher compatibility of the file system
by using existing libraries.

Signed-off-by: Matt Silva <dev@matt-silva.com>
---
 package/Config.in                |   1 +
 package/partclone/Config.in      |  84 ++++++++++++++++++++++++
 package/partclone/partclone.hash |   6 ++
 package/partclone/partclone.mk   | 106 +++++++++++++++++++++++++++++++
 4 files changed, 197 insertions(+)
 create mode 100644 package/partclone/Config.in
 create mode 100644 package/partclone/partclone.hash
 create mode 100644 package/partclone/partclone.mk
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 9a841082c6..23436e751f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -244,6 +244,7 @@  menu "Filesystem and flash utilities"
 	source "package/nfs-utils/Config.in"
 	source "package/nilfs-utils/Config.in"
 	source "package/ntfs-3g/Config.in"
+	source "package/partclone/Config.in"
 	source "package/sp-oops-extract/Config.in"
 	source "package/squashfs/Config.in"
 	source "package/sshfs/Config.in"
diff --git a/package/partclone/Config.in b/package/partclone/Config.in
new file mode 100644
index 0000000000..83ebfa1213
--- /dev/null
+++ b/package/partclone/Config.in
@@ -0,0 +1,84 @@ 
+config BR2_PACKAGE_PARTCLONE
+	bool "partclone"
+	select BR2_PACKAGE_OPENSSL
+	help
+	  Partclone provides utilities to backup a partition smartly and
+	  it is designed for higher compatibility of the file system by
+	  using existing library.
+
+	  https://github.com/Thomas-Tsai/partclone
+
+if BR2_PACKAGE_PARTCLONE
+
+config BR2_PACKAGE_PARTCLONE_FAT
+	bool "fat"
+	help
+	  Include support for the FAT filesystem
+
+config BR2_PACKAGE_PARTCLONE_EXFAT
+	bool "exfat"
+	select BR2_PACKAGE_EXFATPROGS
+	help
+	  Include support for the exFAT filesystem
+
+config BR2_PACKAGE_PARTCLONE_EXT
+	bool "ext"
+	select BR2_PACKAGE_E2FSPROGS
+	help
+	  Include support for the ext2/3/4 filesystems
+
+config BR2_PACKAGE_PARTCLONE_NTFS
+	bool "ntfs"
+	select BR2_PACKAGE_NTFS_3G
+	help
+	  Include support for the NTFS filesystem
+
+config BR2_PACKAGE_PARTCLONE_XFS
+	bool "xfs"
+	depends on BR2_PACKAGE_XFSPROGS
+	help
+	  Include support for the XFS filesystem
+
+comment "xfs support depends on xfsprogs"
+	depends on !BR2_PACKAGE_XFSPROGS
+
+config BR2_PACKAGE_PARTCLONE_BTRFS
+	bool "btrfs"
+	select BR2_PACKAGE_BTRFS_PROGS
+	help
+	  Include support for the BTRFS filesystem
+
+config BR2_PACKAGE_PARTCLONE_F2FS
+	bool "f2fs"
+	select BR2_PACKAGE_F2FS_TOOLS
+	help
+	  Include support for the F2FS filesystem
+
+config BR2_PACKAGE_PARTCLONE_HFSP
+	bool "hfsp"
+	help
+	  Include support for the HFS Plus filesystem
+
+config BR2_PACKAGE_PARTCLONE_FUSE
+	bool "fuse"
+	select BR2_PACKAGE_LIBFUSE
+	help
+	  Include FUSE support
+
+config BR2_PACKAGE_PARTCLONE_MINIX
+	bool "minix"
+	help
+	  Include support for the Minix filesystem
+
+config BR2_PACKAGE_PARTCLONE_APFS
+	bool "apfs"
+	help
+	  Include support for the APFS filesystem
+
+config BR2_PACKAGE_PARTCLONE_NILFS2
+	bool "nilfs2"
+	select BR2_PACKAGE_NILFS_UTILS
+	help
+	  Include support for the NILFS2 filesystem
+
+endif
diff --git a/package/partclone/partclone.hash b/package/partclone/partclone.hash
new file mode 100644
index 0000000000..b73883d3fd
--- /dev/null
+++ b/package/partclone/partclone.hash
@@ -0,0 +1,6 @@ 
+# locally caluclated
+sha256  b7e35a01331a05ec44133f2ec4a097ffb3c005653c0b601279b18dea55ef3b0f  partclone-0.3.37.tar.gz
+
+# license files, locally calculated
+sha256  5380427a1d822444a47a742cf47f5fffbe89519da037c1b150a897c968ed355e  AUTHORS
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING
diff --git a/package/partclone/partclone.mk b/package/partclone/partclone.mk
new file mode 100644
index 0000000000..15d3c7b1fb
--- /dev/null
+++ b/package/partclone/partclone.mk
@@ -0,0 +1,106 @@ 
+################################################################################
+#
+# partclone
+#
+################################################################################
+
+PARTCLONE_VERSION = 0.3.37
+PARTCLONE_SITE = $(call github,Thomas-Tsai,partclone,$(PARTCLONE_VERSION))
+PARTCLONE_LICENSE = GPL-2.0+
+PARTCLONE_LICENSE_FILES = AUTHORS COPYING
+
+PARTCLONE_DEPENDENCIES = openssl
+
+# The following features are not supported as they have dependencies that aren't
+# in buildroot:
+#  --enable_reiserfs
+#  --enable_reiser4
+#  --enable_ufs: there is an existing "ufs-utils" package in buildroot; however,
+#                that package is for "Universal Flash Storage" devices, and the
+#                package partclone requires is for "Unix File System"
+#  --enable_vmfs
+#  --enable_jfs
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_FAT),y)
+PARTCLONE_CONF_OPTS += --enable-fat
+else
+PARTCLONE_CONF_OPTS += --disable-fat
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_EXFAT),y)
+PARTCLONE_DEPENDENCIES += exfatprogs
+PARTCLONE_CONF_OPTS += --enable-exfat
+else
+PARTCLONE_CONF_OPTS += --disable-exfat
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_EXT),y)
+PARTCLONE_DEPENDENCIES += e2fsprogs
+PARTCLONE_CONF_OPTS += --enable-extfs
+else
+PARTCLONE_CONF_OPTS += --disable-extfs
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_NTFS),y)
+PARTCLONE_DEPENDENCIES += ntfs-3g
+PARTCLONE_CONF_OPTS += --enable-ntfs
+else
+PARTCLONE_CONF_OPTS += --disable-ntfs
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_XFS),y)
+PARTCLONE_DEPENDENCIES += xfsprogs
+PARTCLONE_CONF_OPTS += --enable-xfs
+else
+PARTCLONE_CONF_OPTS += --disable-xfs
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_BTRFS),y)
+PARTCLONE_DEPENDENCIES += btrfs-progs
+PARTCLONE_CONF_OPTS += --enable-btrfs
+else
+PARTCLONE_CONF_OPTS += --disable-brtfs
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_F2FS),y)
+PARTCLONE_DEPENDENCIES += f2fs-tools
+PARTCLONE_CONF_OPTS += --enable-f2fs
+else
+PARTCLONE_CONF_OPTS += --disable-f2fs
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_HFSP),y)
+PARTCLONE_CONF_OPTS += --enable-hfsp
+else
+PARTCLONE_CONF_OPTS += --disable-hfsp
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_FUSE),y)
+PARTCLONE_DEPENDENCIES += libfuse
+PARTCLONE_CONF_OPTS += --enable-fuse
+else
+PARTCLONE_CONF_OPTS += --disable-fuse
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_MINIX),y)
+PARTCLONE_CONF_OPTS += --enable-minix
+else
+PARTCLONE_CONF_OPTS += --disable-minix
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_APFS),y)
+PARTCLONE_CONF_OPTS += --enable-apfs
+else
+PARTCLONE_CONF_OPTS += --disable-apfs
+endif
+
+ifeq ($(BR2_PACKAGE_PARTCLONE_NILFS2),y)
+PARTCLONE_DEPENDENCIES += nilfs-utils
+PARTCLONE_CONF_OPTS += --enable-nilfs2
+else
+PARTCLONE_CONF_OPTS += --disable-nilfs2
+endif
+
+PARTCLONE_AUTORECONF = YES
+
+$(eval $(autotools-package))