blob: 259612b269869ebb528c4d093ab3cf049e420cd8 (
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
51
52
53
54
|
# Maintainer: Mario Finelli <mario at finel dot li>
pkgname=cloudlens
pkgver=0.1.3
pkgrel=1
pkgdesc="k9s like CLI for AWS"
arch=(x86_64)
url=https://github.com/one2nc/cloudlens
license=(Apache)
depends=(glibc)
makedepends=(git go)
source=(git+${url}.git#tag=v${pkgver})
sha256sums=('SKIP')
prepare() {
cd $pkgname
export GOPATH="$srcdir/gopath"
go mod download
sed -i \
's/-ldflags "/-ldflags "-linkmode external -extldflags \"${LDFLAGS}\" /' \
Makefile
sed -i \
's/-o ${OUTPUT_BIN}/-o ${OUTPUT_BIN} -trimpath -buildmode=pie -mod=readonly /' \
Makefile
}
check() {
cd $pkgname
export GOPATH="$srcdir/gopath"
go test -mod=readonly -v ./...
}
build() {
cd $pkgname
export GOPATH="$srcdir/gopath"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
make
}
package() {
cd $pkgname
install -Dm0755 execs/$pkgname "$pkgdir/usr/bin/$pkgname"
install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
# vim: set ts=2 sw=2 et:
|