blob: e3b970297fffe70c0a3dd0e91567f5c60b9ca341 (
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
|
# Maintainer: Mario Finelli <mario at finel dot li>
pkgname=redli
pkgver=0.9.0
pkgrel=1
pkgdesc="A humane alternative to the Redis-cli and TLS"
arch=(x86_64)
url=https://github.com/IBM-Cloud/redli
license=(Apache)
depends=(glibc)
makedepends=(go)
source=(https://github.com/IBM-Cloud/redli/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz)
sha256sums=('dcfd2e3397145483af42d0cdf47cdb995c0c5c2db19972d76321bae0abef7082')
prepare() {
cd redli-$pkgver
export GOPATH="${srcdir}/gopath"
go mod download
}
check() {
cd redli-$pkgver
go test ./...
}
build() {
cd redli-$pkgver
export GOPATH="${srcdir}/gopath"
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 redli
}
package() {
cd redli-$pkgver
install -Dm0755 redli "$pkgdir/usr/bin/redli"
install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}
|