summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c185556757d41c0fd4a09e1f5ba57a271ea0a6f9 (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
pkgname=signal-backup-decode-git
pkgver=0.2.3.r0.31100a3
pkgrel=1
pkgdesc="Decode Signal Backups"
arch=('i686' 'x86_64')
url="https://github.com/pajowu/signal-backup-decode"
license=('GPL3')
depends=('openssl' 'sqlite')
makedepends=('git' 'rust')
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/pajowu/signal-backup-decode.git')
md5sums=('SKIP')

_pkgname="${pkgname%-git}"

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

build() {
  cd "$_pkgname"
  cargo build --release --locked
}

check() {
  cd "$_pkgname"
  cargo test --release --locked
}

package() {
  install -Dm755 "$_pkgname/target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}