addpkg: drone-runner-docker 1.6.3-1
This commit is contained in:
parent
2827f2f22c
commit
cb4399b631
4 changed files with 89 additions and 0 deletions
73
drone-runner-docker/PKGBUILD
Normal file
73
drone-runner-docker/PKGBUILD
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||||
|
|
||||||
|
pkgname=drone-runner-docker
|
||||||
|
pkgver=1.6.3
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Drone pipeline runner that executes builds inside Docker containers"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://github.com/drone-runners/drone-runner-docker"
|
||||||
|
license=('custom:Polyform-Small-Business-1.0.0' 'custom:Polyform-Free-Trial-1.0.0')
|
||||||
|
depends=('docker')
|
||||||
|
makedepends=('go' 'git')
|
||||||
|
optdepends=('drone: for a local Drone instance')
|
||||||
|
source=(
|
||||||
|
"$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
|
||||||
|
'systemd.service'
|
||||||
|
'sysusers.conf'
|
||||||
|
'tmpfiles.conf'
|
||||||
|
)
|
||||||
|
b2sums=('0bea0ca1cfb28f543437c73e3f6e60e100ed1c2a947c56ee59256f14696983d0340a5c08c3a2539c5acff2da9d0a568c6a04914bb763dd08b8dec0f3d006386f'
|
||||||
|
'94775ce502d40ed2af17103bc9d3fcffd10df6618654473cca618752ea175eea8258c5b308fab89b88116cdf6a62ed6b18498d5c75119fa30c8ec36d9f043418'
|
||||||
|
'327ef1f6158fc970d37b41d40e3b2f2c937f701ac4d7dda846b48ddf517d3f0e39ce360ae13aef8539587e71f861593941da3be32df032f6d65deb7927c8da9b'
|
||||||
|
'02b6ca4f1bdbaf968c81a2aab25efdb76d53590baadfa4c239239bc2b39bf09f8266775fc8addcf3a51fa48bd0a1ecfdb34c674b7355fbe5476cd53ae1780504')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
# create directory for build output
|
||||||
|
mkdir -p build
|
||||||
|
|
||||||
|
# download dependencies
|
||||||
|
go mod vendor
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
# set Go flags
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
|
||||||
|
go build -v \
|
||||||
|
-trimpath \
|
||||||
|
-buildmode=pie \
|
||||||
|
-mod=readonly \
|
||||||
|
-modcacherw \
|
||||||
|
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
|
||||||
|
-o build \
|
||||||
|
.
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
go test -v ./...
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
# systemd integration
|
||||||
|
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||||
|
install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
||||||
|
install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
|
||||||
|
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
# binary
|
||||||
|
install -vDm755 -t "$pkgdir/usr/bin" build/*
|
||||||
|
|
||||||
|
# licenses
|
||||||
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" licenses/* LICENSE.md
|
||||||
|
|
||||||
|
# documentation
|
||||||
|
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md CHANGELOG.md
|
||||||
|
}
|
14
drone-runner-docker/systemd.service
Normal file
14
drone-runner-docker/systemd.service
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Drone Runner (Docker)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=drone-runner-docker
|
||||||
|
Group=drone-runner-docker
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/var/lib/drone-runner-docker
|
||||||
|
ReadWritePaths=/var/lib/drone-runner-docker
|
||||||
|
ExecStart=/usr/bin/drone-runner-docker
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
1
drone-runner-docker/sysusers.conf
Normal file
1
drone-runner-docker/sysusers.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
u drone-runner-docker - "Drone Runner Docker user"
|
1
drone-runner-docker/tmpfiles.conf
Normal file
1
drone-runner-docker/tmpfiles.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
d /var/lib/drone-runner-docker 0750 drone-runner-docker drone-runner-docker
|
Loading…
Reference in a new issue