blob: a898207ba0331cced1578e12609ae3f031aefb0e (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# Maintainer: Prasanth Baskar <bupdprasanth@gmail.com>
pkgname=dagger-git
pkgver=0.14.0
pkgrel=1
pkgdesc='A portable devkit for CI/CD pipelines'
arch=('x86_64')
url='https://dagger.io'
license=('Apache-2.0')
depends=('glibc')
conflicts=('dagger')
makedepends=('git' 'go')
options=('!lto')
source=("$pkgname::git+https://github.com/dagger/dagger.git#tag=v$pkgver")
sha512sums=('SKIP')
b2sums=('SKIP')
prepare() {
cd "$pkgname"
# create directory for build output
mkdir build
# download dependencies
export GOPATH="${srcdir}"
go mod download
}
build() {
cd "$pkgname"
# set Go flags
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOPATH="${srcdir}"
go build -v \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-compressdwarf=false \
-linkmode external \
-extldflags '${LDFLAGS}' \
-X github.com/dagger/dagger/engine.Version=v$pkgver" \
-o build \
./cmd/...
}
# TODO tests now require docker *kicks docker*
#check() {
# cd "$pkgname"
#
# go test -v ./...
#}
package() {
cd "$pkgname"
install -vDm755 -t "$pkgdir/usr/bin" build/dagger
}
|