diff options
author | nightuser | 2020-09-10 15:12:02 +0300 |
---|---|---|
committer | nightuser | 2020-09-10 15:13:18 +0300 |
commit | 6c71df3d3c503f402533d4271a4a7d4430f45220 (patch) | |
tree | 7b6e8a81e8f6c4b2c913c372886a28b9514d099e | |
download | aur-6c71df3d3c503f402533d4271a4a7d4430f45220.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 0001-Change-the-path-to-patched-btrfs.patch | 29 | ||||
-rw-r--r-- | PKGBUILD | 50 |
3 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9e2af5b7e502 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = dduper-git + pkgdesc = Block-level out-of-band BTRFS dedupe tool + pkgver = 0.01.r39.g3b65aec + pkgrel = 1 + url = https://github.com/Lakshmipathi/dduper + arch = x86_64 + license = GPL2 + makedepends = git + depends = libutil-linux + depends = lzo + depends = zlib + depends = zstd + depends = libgcrypt + depends = python-numpy + depends = python-ptable + source = dduper::git+https://github.com/Lakshmipathi/dduper.git + source = btrfs-progs::git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git + source = 0001-Change-the-path-to-patched-btrfs.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = e00b2c85b3905155ebbedfe0b985e390915ee0576136137937687e008a2de352 + +pkgname = dduper-git + diff --git a/0001-Change-the-path-to-patched-btrfs.patch b/0001-Change-the-path-to-patched-btrfs.patch new file mode 100644 index 000000000000..f3ae25713839 --- /dev/null +++ b/0001-Change-the-path-to-patched-btrfs.patch @@ -0,0 +1,29 @@ +From 97f08a7b8f31833ffa9e170a6603bab8a4e3f0bf Mon Sep 17 00:00:00 2001 +From: nightuser <nightuser.android@gmail.com> +Date: Thu, 10 Sep 2020 14:25:20 +0300 +Subject: [PATCH] Change the path to patched btrfs + +--- + dduper | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/dduper b/dduper +index 6a72d3f..ed16cfb 100755 +--- a/dduper ++++ b/dduper +@@ -194,9 +194,10 @@ def auto_adjust_chunk_sz(src_file_sz, analyze): + def btrfs_dump_csum(filename): + global device_name + +- btrfs_bin = "/usr/sbin/btrfs.static" ++ btrfs_bin = "/usr/lib/dduper-btrfs" + if os.path.exists(btrfs_bin) is False: +- btrfs_bin = "btrfs" ++ print("dduper's patched btrfs is not found") ++ sys.exit(-1) + + out = subprocess.Popen( + [btrfs_bin, 'inspect-internal', 'dump-csum', filename, device_name], +-- +2.28.0 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..692a410ac046 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: nightuser <nightuser.android@gmail.com> + +pkgname=dduper-git +_pkgname=${pkgname%'-git'} +pkgver=0.01.r39.g3b65aec +pkgrel=1 +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/btrfs-$_pkgname" +} + +# vim: noet:sw=8:ts=8 |