blob: 9486b6a283dd8d4f9fa4fc4fc3d927d1fe4b6b79 (
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
|
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer:
pkgname="gitlab-runner"
pkgver="12.0.2"
pkgrel=2
pkgdesc="GitLab runner for CI/CD jobs"
url="https://docs.gitlab.com/runner/"
arch="all"
license="MIT"
makedepends="go"
source="https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$pkgver/gitlab-runner-v$pkgver.tar.gz"
builddir="$srcdir/src/gitlab.com/gitlab-org/$pkgname"
options="net"
subpackages="$pkgname-helper"
export GOPATH="$srcdir"
export CGO_ENABLED=0
prepare() {
mkdir -p ${builddir%/*}
mv "$srcdir"/$pkgname-v$pkgver "$builddir"/
default_prepare
}
build() {
local ldflags="
-X gitlab.com/gitlab-org/$pkgname/common.NAME=$pkgname
-X gitlab.com/gitlab-org/$pkgname/common.VERSION=$pkgver
-X gitlab.com/gitlab-org/$pkgname/common.REVISION=unknown
-X gitlab.com/gitlab-org/$pkgname/common.BUILT=$(date -u +%Y-%m-%dT%H:%M:%S%z)
-X gitlab.com/gitlab-org/$pkgname/common.BRANCH=unknown
-s -w
"
go build -ldflags "$ldflags" -o bin/gitlab-runner
go build -ldflags "$ldflags" -o bin/gitlab-runner-helper \
./apps/gitlab-runner-helper
}
package() {
install -Dm755 "$builddir"/bin/gitlab-runner \
"$pkgdir"/usr/bin/gitlab-runner
}
helper() {
pkgdesc="$pkgdesc (helper)"
install -Dm755 "$builddir"/bin/gitlab-runner-helper \
"$subpkgdir"/usr/bin/gitlab-runner-helper
}
sha512sums="ccc1f7c8b2123f91e1ad440acaf69b2fdb435dd016c7e0c1d75c6f706d4ff79ea2eb7d34e91986d82afa3606b5453b4fbb18530f553c826809173cf88ecb810f gitlab-runner-v12.0.2.tar.gz"
|