summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c43ae12dd6e0f1192422aa533f9e4c14a8f3b22a (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
# Maintainer: Ian Young <ian at iangreenleaf dot com>

pkgname=duplicacy
pkgver=2.1.1_1
_pkgver=2.1.1
pkgrel=1
pkgdesc="A new generation cloud backup tool based on lock-free deduplication"
arch=('x86_64' 'i686')
url="https://duplicacy.com/"
license=('custom')
depends=('glibc')
makedepends=('go' 'git')
source=("$pkgname-$pkgver.tar.gz::https://github.com/gilbertchen/$pkgname/archive/v$_pkgver.tar.gz")
sha256sums=('63f45389429cac27ef7ba54216fc2f696a0ffbee86c0316b1c4913aef66f1105')

prepare() {
  cd "$pkgname-$_pkgver/$pkgname"

  mkdir -p "src/github.com/gilbertchen"
  ln -sf "$srcdir/$pkgname-$_pkgver" "src/github.com/gilbertchen/$pkgname"

  GOPATH="$srcdir/$pkgname-$_pkgver/$pkgname" go get -d -v
}

build() {
  cd "$pkgname-$_pkgver/$pkgname"

  GOPATH="$srcdir/$pkgname-$_pkgver/$pkgname" go build -x
}

check() {
  cd "$pkgname-$_pkgver/$pkgname"

  GOPATH="$srcdir/$pkgname-$_pkgver/$pkgname" go test -v -x
}

package() {
  cd "$pkgname-$_pkgver"

  install -Dm755 "$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}