blob: 5e3e04907314423a90a0b0b9e8365c04413fbd66 (
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.7
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=('e1345d803fe7e4b6b6f42e54f3e1e604b098653c23af86795d248fafe0cee959')
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"
}
|