addpkg: drone 2.1.0-1

This commit is contained in:
George Rawlinson 2021-08-25 01:14:27 +00:00
parent be82e6f723
commit a8b2c72f71
Signed by: grawlinson
GPG key ID: E0959FEA8B550539
5 changed files with 99 additions and 0 deletions

14
drone/.SRCINFO Normal file
View file

@ -0,0 +1,14 @@
pkgbase = drone
pkgdesc = Drone is a Continuous Delivery platform built on Docker, written in Go - OSS variant
pkgver = 2.0.3
pkgrel = 1
url = https://drone.io
arch = x86_64
license = Apache
makedepends = go
makedepends = git
source = drone-2.0.3.tar.gz::https://github.com/drone/drone/archive/v2.0.3.tar.gz
sha256sums = 354b60a8616dfa17ebe3f82026f0865619e55f0725a60d850ce81c50733debcb
pkgname = drone

68
drone/PKGBUILD Normal file
View file

@ -0,0 +1,68 @@
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Khorne <khorne AT khorne DOT me>
pkgname=drone
pkgver=2.1.0
pkgrel=1
pkgdesc="Continuous Delivery platform built on container technology (OSS version)"
arch=('x86_64')
url="https://drone.io"
license=('Apache')
makedepends=('go' 'git')
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/drone/drone/archive/v$pkgver.tar.gz"
'systemd.service'
'tmpfiles.conf'
'sysusers.conf'
)
b2sums=('13615a2d04f76ef6359b1b6b8db049f54c8d87905c595de148f4e2e05936eb1e5d7d4f6ee5ffcbd9a08bf218fa74d8ac629060d23b4079cc33f750444528a71c'
'b26d11b697d496378a0cf0d6592309dab5a6af58e0776bc2a168eb3c478cb97134ce3db7ab858d5bf6d89a9e465cc865463963a0693270296f3e81707dbbd6f0'
'9c1bf8e4a382190f2d1bd560ef5c4a9fadad8c38dcd3cf3b79af42f6d0c16de533ba2d5f6cf676003e4ca6b745833e5e100baf4328111cf540ac5f43f67c6145'
'65912606d44a45cdcfb449c766313384529b48f30b8f3fa0a79da9cb179639c65af76adcf10005213a2563e90f91eab4f7f5b3250656d2949991ccad58e912f5')
prepare() {
cd "$pkgname-$pkgver"
# create directory for build output
mkdir 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=vendor \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
-tags "oss nolimit" \
-o build ./cmd/...
}
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/*
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" .github/readme.md *.md
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE NOTICE
}

15
drone/systemd.service Normal file
View file

@ -0,0 +1,15 @@
[Unit]
Description=Drone
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/usr/bin/drone-server
RestartSec=2
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=drone-server
[Install]
WantedBy=multi-user.target

1
drone/sysusers.conf Normal file
View file

@ -0,0 +1 @@
u drone "Drone system user" /var/lib/drone

1
drone/tmpfiles.conf Normal file
View file

@ -0,0 +1 @@
d /var/lib/drone 0755 drone drone