mirror of
https://github.com/openwrt/packages.git
synced 2026-10-13 01:27:31 +04:00
duperemove is a simple tool for finding duplicated extents and submitting them for deduplication. It will de-dupe results on btrfs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Keith T. Garner <kgarner@kgarner.com>
62 lines
1.9 KiB
Makefile
62 lines
1.9 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=duperemove
|
|
PKG_VERSION:=0.15.2
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=https://codeload.github.com/markfasheh/duperemove/tar.gz/v$(PKG_VERSION)?
|
|
PKG_HASH:=27809aa91b7b9b7d0810e5329614bf80af2c48e917781e682a3fbcf61fa274da
|
|
|
|
PKG_MAINTAINER:=Keith Garner <kgarner@kgarner.com>
|
|
PKG_LICENSE:=GPL-2.0-only
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
PKG_BUILD_DEPENDS:=xxhash libbsd
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
# Pass VERSION/IS_RELEASE to the source's Makefile via MAKE_FLAGS, appended
|
|
# after the include since package-defaults.mk assigns MAKE_FLAGS with "=".
|
|
# A plain "export VERSION=" doesn't work: Package/Default reassigns the
|
|
# top-level VERSION to the ipk version string, clobbering it.
|
|
MAKE_FLAGS += VERSION=$(PKG_VERSION) IS_RELEASE=1
|
|
|
|
define Package/duperemove
|
|
SECTION:=utils
|
|
CATEGORY:=Utilities
|
|
SUBMENU:=Filesystem
|
|
TITLE:=Duplicate file removal tool
|
|
URL:=https://markfasheh.github.io/duperemove/
|
|
DEPENDS:= \
|
|
+glib2 \
|
|
+libatomic \
|
|
+libblkid \
|
|
+libmount \
|
|
+libsqlite3 \
|
|
+libuuid \
|
|
+lscpu
|
|
endef
|
|
|
|
define Package/duperemove/description
|
|
Duperemove is a simple tool for finding duplicated extents and submitting
|
|
them for deduplication. When given a list of files it will hash their
|
|
contents on an extent by extent basis and compare those hashes to each
|
|
other, finding and categorizing extents that match each other. Optionally,
|
|
a per-block hash can be applied for further duplication lookup. When given
|
|
the -d option, duperemove will submit those extents for deduplication using
|
|
the Linux kernel FIDEDUPRANGE ioctl.
|
|
endef
|
|
|
|
define Package/duperemove/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/duperemove $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/hashstats $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/btrfs-extent-same $(1)/usr/bin
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,duperemove))
|