2023-03-21 13:16:34 +01:00
|
|
|
pkgname=gitea-act-runner
|
2023-09-25 02:00:22 +02:00
|
|
|
pkgver=0.2.6
|
2023-03-21 13:16:34 +01:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A runner for Gitea based on act."
|
|
|
|
arch=(x86_64)
|
|
|
|
url="https://gitea.io"
|
|
|
|
license=(MIT)
|
|
|
|
makedepends=(go git)
|
|
|
|
options=(!lto)
|
2023-08-05 14:40:08 +02:00
|
|
|
source=(git+https://gitea.com/gitea/act_runner.git#tag=v$pkgver
|
2023-03-21 13:16:34 +01:00
|
|
|
gitea-act-runner.service
|
|
|
|
gitea-act-runner.sysusers
|
|
|
|
gitea-act-runner.tmpfiles)
|
2023-03-24 21:12:31 +01:00
|
|
|
sha256sums=('SKIP'
|
2023-08-17 20:38:48 +02:00
|
|
|
'ac65e2cb2c33e610501627b27bcd9917ecaa1cd83c7b8c0375383fd80909ccd3'
|
2023-03-21 13:16:34 +01:00
|
|
|
'2a59d9fb29fc93c14bce7a8c34f454a44e5a84e0eebaa60fea00b74961dd82d6'
|
|
|
|
'93bf08efe2c7c669ee3a15fb281cc004441ddb6c60bdda9237cfd0ebd29113d1')
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ${srcdir}/act_runner
|
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
2023-03-24 08:33:58 +01:00
|
|
|
go build \
|
|
|
|
-tags 'netgo osusergo' \
|
|
|
|
-trimpath \
|
|
|
|
-buildmode=pie \
|
|
|
|
-mod=readonly \
|
|
|
|
-modcacherw \
|
2023-08-05 14:40:08 +02:00
|
|
|
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X \"gitea.com/gitea/act_runner/internal/pkg/ver.version=v$pkgver\"" \
|
2023-03-24 08:33:58 +01:00
|
|
|
.
|
2023-03-21 13:16:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd ${srcdir}/act_runner
|
|
|
|
make test
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd ${srcdir}/act_runner
|
|
|
|
install -Dm755 act_runner -T "${pkgdir}"/usr/bin/${pkgname}
|
|
|
|
install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
|
|
|
|
install -Dm644 ../${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
|
|
|
|
install -Dm644 ../${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
|
|
|
|
install -Dm644 ../${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
|
|
|
|
}
|