summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee01ede03b841918c0bd57e4930cd2e5cca8bdfe (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
# Maintainer: Ward Segers <w@rdsegers.be>

pkgname=signal-back-git
pkgver=0.1.6.r0.5b3bce7
pkgrel=2
pkgdesc="Decrypt Signal encrypted backups outside the app"
arch=('i686' 'x86_64')
url="https://github.com/xeals/signal-back"
license=('Apache')
makedepends=('dep' 'git' 'go-pie')
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/xeals/signal-back.git')
md5sums=('SKIP')

_pkgname="${pkgname%-git}"

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

prepare() {
  rm -rf -- src/github.com/xeals
  mkdir -p src/github.com/xeals
  mv "$_pkgname" src/github.com/xeals/

  cd src/github.com/xeals/signal-back/
  git checkout v0.1.6
}

build() {
  export GOPATH="$srcdir"
  cd "$GOPATH/src/github.com/xeals/$_pkgname"
  dep ensure
  go build .
}

package() {
  install -Dm755 "$srcdir/src/github.com/xeals/$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}