blob: 47722994e39468add571be543d5c42345d3d1753 (
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
|
# Maintainer: Arnab Bose <hirak99+arch@gmail.com>
# Huge thanks to github.com/nebulosa2007 for this version of the PKGBUILD.
pkgname=yabsnap
pkgver=2.2.5
pkgrel=1
pkgdesc="Btrfs automated snapshot manager."
arch=('any')
url="https://github.com/hirak99/$pkgname"
license=('Apache')
depends=('bash' 'btrfs-progs' 'python')
optdepends=('rsync: rsync based snapshot support')
makedepends=('tar')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
md5sums=('3306f6363919959f71a2c4a8a0664fd2')
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"
}
|