47 lines
1.8 KiB
Text
47 lines
1.8 KiB
Text
# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
|
|
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
|
pkgname=forgejo-runner
|
|
pkgver=3.5.0
|
|
pkgrel=2
|
|
pkgdesc="CI/CD job runner for Forgejo"
|
|
url="https://code.forgejo.org/forgejo/runner"
|
|
arch="all"
|
|
license="MIT"
|
|
makedepends="go"
|
|
install="$pkgname.pre-install $pkgname.pre-upgrade"
|
|
subpackages="$pkgname-openrc"
|
|
source="$pkgname-$pkgver.tar.gz::https://code.forgejo.org/forgejo/runner/archive/v$pkgver.tar.gz
|
|
|
|
forgejo-runner.logrotate
|
|
forgejo-runner.initd
|
|
forgejo-runner.confd
|
|
"
|
|
builddir="$srcdir/runner"
|
|
options="!check" # tests require running forgejo
|
|
|
|
build() {
|
|
go build \
|
|
-o forgejo-runner \
|
|
-ldflags "-X gitea.com/gitea/act_runner/internal/pkg/ver.version=$pkgver"
|
|
./forgejo-runner generate-config > config.example.yaml
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 forgejo-runner -t "$pkgdir"/usr/bin/
|
|
install -Dm644 config.example.yaml -t "$pkgdir"/etc/forgejo-runner/
|
|
|
|
install -Dm755 "$srcdir"/forgejo-runner.initd "$pkgdir"/etc/init.d/forgejo-runner
|
|
install -Dm644 "$srcdir"/forgejo-runner.confd "$pkgdir"/etc/conf.d/forgejo-runner
|
|
install -Dm644 "$srcdir"/forgejo-runner.logrotate "$pkgdir"/etc/logrotate.d/forgejo-runner
|
|
}
|
|
|
|
sha512sums="
|
|
e78968a5f9b6e797fb759a5c8cbf46a5c2fef2083dabc88599c9017729faface963576c63a948b0add424cb267902e864fb1a1b619202660296976d93e670713 forgejo-runner-3.5.0.tar.gz
|
|
a3c7238b0c63053325d31e09277edd88690ef5260854517f82d9042d6173fb5d24ebfe36e1d7363673dd8801972638a6e69b6af8ad43debb6057515c73655236 forgejo-runner.logrotate
|
|
bb0c6fbe90109c77f9ef9cb0d35d20b8033be0e4b7a60839b596aa5528dfa24309ec894d8c04066bf8fb30143e63a5fd8cc6fc89aac364422b583e0f840e2da6 forgejo-runner.initd
|
|
e11eab27f88f1181112389befa7de3aa0bac7c26841861918707ede53335535425c805e6682e25704e9c8a6aecba3dc13e20900a99df1183762b012b62f26d5f forgejo-runner.confd
|
|
"
|