blob: c2610c0a164c1f7fb5b93802f61debc103537d49 (
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
|
# Maintainer: Arnab Bose <hirak99+arch@gmail.com>
# Huge thanks to github.com/nebulosa2007 for this version of the PKGBUILD.
pkgname=yabsnap
pkgver=2.1.6
pkgrel=1
pkgdesc="Btrfs automated snapshot manager."
arch=('any')
url="https://github.com/hirak99/$pkgname"
license=('Apache')
# Dependencies -
# btrfs-progs: Required for btrfs operations. May change if we extend into rsync
# rsync based options.
# python3: Runtime. Typically present in a base install.
depends=('bash' 'btrfs-progs' 'python')
makedepends=('tar')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
md5sums=('b235a90ad764be1b918a7f82d7aeed06')
install="$pkgname".install
check() {
cd "$pkgname"-"$pkgver"/artifacts
# One-time action to do after downloading the package.
gzip -c "$pkgname".manpage > "$pkgname".1.gz
}
package() {
cd "$pkgname"-"$pkgver"
readonly DEST="$pkgdir"/usr/share/"$pkgname"
mkdir -p "$DEST"
pushd src/
tar -cf - \
$(find -type f -not -name "*_test.py" \( -name "*.py" -o -name "*.conf" \)) |
tar -xf - -C "$DEST"/ --no-same-owner
pushd "$DEST"/
chmod -R u=rwX,go=rX .
popd
popd
cd artifacts
install -Dm 644 services/"$pkgname".{service,timer} -t "$pkgdir"/usr/lib/systemd/system/
install -Dm 664 pacman/*.hook -t "$pkgdir"/usr/share/libalpm/hooks/
install -Dm 644 "$pkgname".1.gz -t "$pkgdir"/usr/share/man/man1/
cd ../src
install -Dm 755 "$pkgname".sh -t "$DEST"/
install -d "$pkgdir"/usr/bin
ln -s /usr/share/"$pkgname"/"$pkgname".sh "$pkgdir"/usr/bin/"$pkgname"
}
|