blob: c30db98df8f95af4aa6edfd1cec4c7cf29846514 (
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
|
# Maintainer: Linus Karlsson <linus.karlsson@debricked.com>
pkgname=debricked
pkgver=2.4.1
pkgrel=1
pkgdesc="A CLI tool to interact with Debricked"
arch=('x86_64')
url="https://github.com/debricked/cli"
license=('MIT')
depends=('git' 'glibc')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
b2sums=('b15bcbc55fb7305546469dedecde1daaf17b6fb86c4c47ec41f4281c7eb4f280d6ec44b8d1a30dc4eed64bfd1e24d1e2786694ff3c92c1d1fe64bc2a4345a7f3')
prepare() {
cd "cli-$pkgver"
# download dependencies
go mod download
go mod verify
}
build() {
cd "cli-$pkgver"
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"
(cd cmd/debricked && go generate -v -x)
go build -ldflags "-X main.version=${pkgver}" -o debricked ./cmd/debricked
}
package() {
cd "cli-$pkgver"
install -Dpm 0755 debricked "$pkgdir/usr/bin/debricked"
install -Dpm 0644 LICENSE "$pkgdir/usr/share/licenses/debricked/LICENSE"
}
|