aur/gitea-act-runner/PKGBUILD
nyyu f8a3a0c361
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: update gitea-act-runner
2023-03-24 08:35:10 +01:00

53 lines
1.6 KiB
Bash

pkgname=gitea-act-runner
pkgver=0.0.2
pkgrel=1
pkgdesc="A runner for Gitea based on act."
arch=(x86_64)
url="https://gitea.io"
license=(MIT)
makedepends=(go git)
options=(!lto)
source=(#git+https://gitea.com/gitea/act_runner.git
https://nyyu.dev/sources/act_runner-main.tar.gz
gitea-act-runner.service
gitea-act-runner.sysusers
gitea-act-runner.tmpfiles)
sha256sums=('03da58d18c1caa0a3608c038a65a14b77197037ac427b0ca96c3db943337eb40'
'50691e625cb8ecc54b2014ca23d75355ffc40c26537e1fc17acea3a94b66d10d'
'2a59d9fb29fc93c14bce7a8c34f454a44e5a84e0eebaa60fea00b74961dd82d6'
'93bf08efe2c7c669ee3a15fb281cc004441ddb6c60bdda9237cfd0ebd29113d1')
#pkgver() {
# cd act_runner
# printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
#}
build() {
cd ${srcdir}/act_runner
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
go build \
-tags 'netgo osusergo' \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
.
}
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
}