blob: 2a7757b768d32c14c91930d7cd238ad3b0789ceb (
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
|
# Maintainer: Dylan Delgado <dylan1496@live.com>
# Contributor: ml <ml@visu.li>
pkgname=spruce
pkgver=1.31.0
pkgrel=1
pkgdesc='General purpose YAML/JSON merging tool'
arch=('x86_64')
url='https://github.com/geofffranks/spruce'
license=('Apache')
depends=('glibc')
makedepends=('go')
source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('39278f423c979688b14817fe48fc80fb7bd828fd864ded50edede302342aab60')
build() {
cd "$pkgname-$pkgver"
export CGO_ENABLED=1
export CGO_LDFLAGS="$LDFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=vendor'
go build -ldflags="-linkmode=external -X=main.Version=$pkgver" ./cmd/spruce
}
check() {
cd "$pkgname-$pkgver"
go test -ldflags=-linkmode=external -short ./...
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "$pkgname" -t "$pkgdir/usr/bin"
install -Dm755 doc/* -t "$pkgdir/usr/share/doc/$pkgname"
cp -a examples -t "$pkgdir/usr/share/doc/$pkgname"
}
|