blob: d7004d27c02db1829d485184e3f023e79f484a29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# 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))
|