blob: 62eb17ad8fb7e9a5593e0a7c7ff83ca59fc3ed9f (
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
|
# Maintainer: Josephine Pfeiffer <jpfeiffe@redhat.com>
pkgname=cherryctl
pkgver=0.1.3
pkgrel=1
pkgdesc='Cherry Servers CLI.'
arch=('x86_64')
url='https://github.com/cherryservers/cherryctl'
license=('MPL-2.0')
makedepends=(git go)
depends=(glibc)
conflicts=()
_commit="b3494ce755951a0639ec35f4df73406b2b7b706c" # v0.1.3
source=("git+$url#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/cherryctl"
git describe --tags | sed 's/^v//;s/-/+/g'
}
prepare(){
cd "$srcdir/cherryctl"
mkdir -p build/
}
build() {
cd "$srcdir/cherryctl"
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 .
}
check() {
cd "$srcdir/cherryctl"
# tests failing upstream
# go test -v ./...
}
package() {
cd "$srcdir/cherryctl"
install -Dm755 build/cherryctl -t "$pkgdir"/usr/bin/
install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/cherryctl/LICENSE"
}
|