blob: 797d89e5d3bfd6047cc59e942642b8ecae8d45f5 (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=devbox
pkgver=0.13.6
pkgrel=1
pkgdesc='A cli tool to easily create isolated shells and containers'
arch=(x86_64)
url="https://github.com/jetpack-io/$pkgname"
license=(Apache-2.0)
depends=(nix)
makedepends=(go)
optdepends=('docker: for container support')
_archive="$pkgname-$pkgver"
source=("$url/archive/$pkgver/$_archive.tar.gz")
sha256sums=('5ae3b566a7003b123346ec2f5fc0d2853cece706da12a45c67a327c92834e73c')
prepare(){
cd "$_archive"
export GOPATH="$srcdir"
go mod download
}
build() {
cd "$_archive"
export GOPATH="$srcdir"
local _prefix=go.jetpack.io/devbox/build
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"$LDFLAGS\" -X $_prefix.Version=$pkgver" \
-o $pkgname cmd/devbox/main.go
}
check() {
cd "$_archive"
export GOPATH="$srcdir"
# go test ./boxcli
}
package() {
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
}
|