archrelease: copy trunk to community-any
[ArchLinux/community.git] / desync / trunk / PKGBUILD
blob01c1fc3426e4cfea8a622c041c406ab9a523efdd
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=desync
4 pkgver=0.9.3
5 pkgrel=1
6 pkgdesc="Alternative casync implementation"
7 arch=(x86_64)
8 url="https://github.com/folbricht/desync"
9 license=(BSD)
10 depends=(glibc)
11 makedepends=(go)
12 source=($pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
13 sha512sums=('ffd97773a51c420c6470ee26c1c93308d625079b8fa598cc8d9558c050a3a86e6096dff1f8b9cbc3413fa70048ba4445a34fd238ab4737e720470572430b43a6')
14 b2sums=('a5d898eadae0b3d42af61fa545b0c556dd5ab90127a4132a23a6feb15217b11ec3385040f40c35e6223eff52f58a0bdb2ec66f165e45915c80674db47fc64003')
16 build() {
17   export CGO_CPPFLAGS="${CPPFLAGS}"
18   export CGO_CFLAGS="${CFLAGS}"
19   export CGO_CXXFLAGS="${CXXFLAGS}"
20   export CGO_LDFLAGS="${LDFLAGS}"
21   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
23   cd $pkgname-$pkgver
24   go build -o $pkgname ./cmd/$pkgname
27 check() {
28   cd $pkgname-$pkgver
29   go test ./cmd/$pkgname
32 package() {
33   cd $pkgname-$pkgver
34   install -vDm 755 $pkgname -t "$pkgdir/usr/bin/"
35   install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
36   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"