2021-08-25 01:14:27 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
# Contributor: Khorne <khorne AT khorne DOT me>
|
|
|
|
|
|
|
|
pkgname=drone
|
2021-09-09 17:48:57 +00:00
|
|
|
pkgver=2.3.1
|
2021-09-12 08:32:30 +00:00
|
|
|
pkgrel=2
|
2021-09-07 01:19:48 +00:00
|
|
|
pkgdesc="Continuous Delivery platform built on container technology"
|
2021-08-25 01:14:27 +00:00
|
|
|
arch=('x86_64')
|
|
|
|
url="https://drone.io"
|
2021-09-07 01:19:48 +00:00
|
|
|
license=('custom:Drone-Non-Commercial')
|
2021-09-08 01:01:05 +00:00
|
|
|
# ref: https://discourse.drone.io/t/exec-runner-404-error-on-ping/7922
|
2021-08-25 01:14:27 +00:00
|
|
|
makedepends=('go' 'git')
|
|
|
|
source=(
|
|
|
|
"$pkgname-$pkgver.tar.gz::https://github.com/drone/drone/archive/v$pkgver.tar.gz"
|
|
|
|
'systemd.service'
|
|
|
|
'tmpfiles.conf'
|
|
|
|
'sysusers.conf'
|
|
|
|
)
|
2021-09-09 17:48:57 +00:00
|
|
|
b2sums=('623b2d1ca3d68c9169b0f4bd35678e6a459d9db054338bb3a604cb050ad7b9eacdf997c169ea12ae0afbaa0af42621e86ada2a94f488584fb8c63406e2ce121d'
|
2021-09-12 08:32:30 +00:00
|
|
|
'3d3e2ad52fe1ec9f1c803540de5baa01ed0cda3b720551e6594223b5f0a836bc69448b30b6e1408d13e2451e6d25666c2bc7b188a7a1075afec4ef70a6f0b48c'
|
2021-08-25 01:14:27 +00:00
|
|
|
'9c1bf8e4a382190f2d1bd560ef5c4a9fadad8c38dcd3cf3b79af42f6d0c16de533ba2d5f6cf676003e4ca6b745833e5e100baf4328111cf540ac5f43f67c6145'
|
2021-09-07 01:19:48 +00:00
|
|
|
'18e5c4ea19348479dc3408bd2546f324f0908acc759c7c79c350006c6c5e6db02cd388a9aa9bd3d4f6b4b1f2efcf6aa7f7e67eac43f8d55566afe341b7ec142e')
|
2021-08-25 01:14:27 +00:00
|
|
|
|
|
|
|
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}\"" \
|
2021-09-07 01:19:48 +00:00
|
|
|
-o build \
|
|
|
|
./cmd/...
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd "$pkgname-$pkgver"
|
|
|
|
go test -v ./...
|
2021-08-25 01:14:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|