summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc8c7c08ee5b9577bbe69982db2b082a59c0688f (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
# Maintainer: nightuser <nightuser.android@gmail.com>

pkgname=dduper-git
_pkgname=${pkgname%'-git'}
pkgver=0.01.r39.g3b65aec
pkgrel=2
pkgdesc='Block-level out-of-band BTRFS dedupe tool'
url="https://github.com/Lakshmipathi/dduper"
license=(GPL2)
arch=(x86_64)
makedepends=('git')
depends=('libutil-linux' 'lzo' 'zlib' 'zstd' 'libgcrypt' 'python-numpy' 'python-ptable')
source=(
	"$_pkgname::git+https://github.com/Lakshmipathi/dduper.git"
	'btrfs-progs::git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git'
	'0001-Change-the-path-to-patched-btrfs.patch')
sha256sums=(
	'SKIP'
	'SKIP'
	'e00b2c85b3905155ebbedfe0b985e390915ee0576136137937687e008a2de352')

pkgver() {
	cd "$srcdir/$_pkgname"
	git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

prepare() {
	cd "$srcdir/$_pkgname"
	patch -Np1 -i "$srcdir/0001-Change-the-path-to-patched-btrfs.patch"

	cd "$srcdir/btrfs-progs"
	patch -Np1 -i "$srcdir/$_pkgname/patch/btrfs-progs-v5.6.1/0001-Print-csum-for-a-given-file-on-stdout.patch"
}

build() {
	cd "$srcdir/btrfs-progs"
	./autogen.sh
	./configure --prefix=/usr --with-crypto=libgcrypt \
		--disable-documentation \
		--disable-shared --disable-static \
		--disable-convert --disable-python
	make btrfs
}

package() {
	install -Dm755 "$srcdir/$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
	install -Dm755 "$srcdir/btrfs-progs/btrfs" "$pkgdir/usr/lib/$_pkgname-btrfs"
}

# vim: noet:sw=8:ts=8