summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c2c74f77c3ded150c3ad228dc4b3111702081fa7 (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
# Maintainer: Mufeed Ali <lastweakness@tuta.io>
# Maintainer: Salamandar <salamandar@salamandar.fr>

pkgname=keepass-diff
_author=Narigo
_gitname=keepass-diff
pkgver=1.1.3
pkgrel=1
pkgdesc='Tool to find diff between KeePass (*.kdbx) files'
arch=(any)
url=https://github.com/Narigo/keepass-diff
license=(MIT)
makedepends=(
    cargo
)
source=(
    "$_gitname-v$pkgver.tar.gz::https://github.com/$_author/$_gitname/archive/$pkgver.tar.gz"
)
sha256sums=(
    '4ddf872f126ee74cc4b44f7b6aabe516da9a4c0dee1466110ca9acec04079325'
)

prepare() {
    cd "$_gitname-$pkgver"
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd "$_gitname-$pkgver"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --locked --all-features
}

check() {
    cd "$_gitname-$pkgver"
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features
}

package() {
    cd "$_gitname-$pkgver"
    install -Dm0755 -t "$pkgdir/usr/bin" "target/release/keepass-diff"
    install -Dm0644 -t "$pkgdir/usr/share/doc/${pkgname}" "README.md"
    install -Dm0644 -t "$pkgdir/usr/share/licenses/${pkgname}" "LICENSE"
}