blob: 3f522f01095878f37fd9e05f167ac17ca599914f (
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
43
44
45
46
47
48
49
50
|
# Maintainer: Brittany Figueroa <dormwear underscore iure at crowley dot seership dot dev>
pkgname=oauth2l
pkgver=1.3.0
pkgrel=1
pkgdesc='Simple CLI for interacting with Google API authentication'
arch=('x86_64')
url="https://github.com/google/${pkgname}"
license=('Apache')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz"::"${url}/archive/refs/tags/v${pkgver}.tar.gz")
b2sums=('83044b616e65881d54b78bd8e6d9ec6890cd3087a91c8574a976aa2f5f1ed1ac4fa2d50fd9d438a8b608d53af2a56e232c304cc2c984ac3b582fffdfe2ca01df')
prepare() {
cd "${pkgname}-${pkgver}"
mkdir --parents 'build'
}
build() {
cd "${pkgname}-${pkgver}"
export \
CGO_CPPFLAGS="${CPPFLAGS}" \
CGO_CFLAGS="${CFLAGS}" \
CGO_CXXFLAGS="${CXXFLAGS}" \
CGO_LDFLAGS="${LDFLAGS}"
go build \
-buildmode=pie \
-ldflags "
-extldflags ${LDFLAGS}
-linkmode=external
-X main.version=$pkgver
" \
-mod=readonly \
-modcacherw \
-o build \
-trimpath \
./...
}
#check() {
# cd "${pkgname}-${pkgver}"
# go test \
# -mod=readonly \
# -v \
# ./...
#}
package() {
install -D --mode 755 "${pkgname}-${pkgver}/build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}
|