blob: 32a47b35c17858e3bd8132ad82e171ac3f8af0ad (
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
|
# Maintainer: Frederick Zhang <frederick888@tsundere.moe>
pkgname=gup
pkgver=0.27.5
pkgrel=1
pkgdesc='Update binaries installed by "go install" with goroutines'
arch=('x86_64' 'aarch64' 'armv7h' 'armv7l')
url='https://github.com/nao1215/gup'
license=('Apache-2.0')
depends=()
makedepends=('go')
options=('!lto')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/nao1215/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
sha512sums=('930709fb0ee404ea5d8acef5e3f16f91809ffa81baa7001e960db03b76a2a3991d43d4796ae5b994b724f08cd20c21c713249bcfcb072a74fcb8a24f9c9d2996')
b2sums=('6cb17ae3cb158d1422de6cf97aec02c7a962d45cb5101f16625894641875623908e36b00359cb913cd067f9c4fbd50bccb9bd3aa4ad70ea976b65840f1c4f493')
build() {
cd "${pkgname}-${pkgver}"
# set Go flags
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOPATH="${srcdir}"
go build -v \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-compressdwarf=false \
-linkmode external \
-extldflags \"${LDFLAGS}\"" \
-o "${pkgname}"
"./${pkgname}" completion bash >"${pkgname}.bash"
"./${pkgname}" completion zsh >"${pkgname}.zsh"
"./${pkgname}" completion fish >"${pkgname}.fish"
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 "${pkgname}" -t "${pkgdir}"/usr/bin/
install -Dm644 "${pkgname}.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
install -Dm644 "${pkgname}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
install -Dm644 "${pkgname}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
# vim: ts=2 sw=2 et:
|