blob: 68afa21d504018a7dcea921aff6fce4a158d041f (
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
|
pkgname=piv-agent
pkgver=0.22.0
pkgrel=1
pkgdesc='An SSH and GPG agent which you can use with your PIV hardware security device (e.g. a Yubikey).'
arch=('x86_64')
url="https://github.com/smlx/${pkgname}"
license=('Apache-2.0')
makedepends=('go')
source=("${url}/archive/v${pkgver}.tar.gz")
sha256sums=('c536ebcc50d5e112de4b06e510ffc1377f7b8b3dcd8119c5f25d775b7b5da64f')
prepare(){
cd "${pkgname}-${pkgver}"
mkdir -p build/
}
build() {
cd "${pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o build ./cmd/...
}
check() {
cd "${pkgname}-${pkgver}"
go test ./...
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
}
|