diff options
author | Edvinas Valatka | 2020-03-30 17:40:32 +0300 |
---|---|---|
committer | Edvinas Valatka | 2020-03-30 17:40:32 +0300 |
commit | 73e76d1d018e8790c30e384def3af2c4461de59e (patch) | |
tree | a3d5c889dff0a9437d808f15a366d3cdcdf0b364 /PKGBUILD | |
parent | bb744c9e147f06e7cd41442654f9f2306cbb830d (diff) | |
download | aur-73e76d1d018e8790c30e384def3af2c4461de59e.tar.gz |
Refactor
Rename package according AUR rules.
Bump version to 2.165.2.
Move runner working dir to /var/lib/github-actions.
Fix license.
Add sudo to dependencies.
Add .gitignore.
Fix source URL.
Silence ldd warnings
Disable service on package removal.
Other minor improvements.
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-x | PKGBUILD | 69 |
1 files changed, 40 insertions, 29 deletions
@@ -1,51 +1,62 @@ -# Maintainer: Samuel Williams <samuel@oriontransfer.net> +# Maintainer : Samuel Williams <samuel@oriontransfer.net> +# Contributor : Edvinas Valatka <edacval@gmail.com> -pkgname=github-actions -pkgver=2.161.0 -pkgrel=4 +_pkgname=github-actions +pkgname=${_pkgname}-bin +pkgver=2.165.2 +pkgrel=1 pkgdesc='GitHub Actions self-hosted runner tools.' arch=('x86_64') -url='https://help.github.com/en/actions' -license=('custom') +url='https://github.com/actions/runner' +license=('MIT') OPTIONS=(!strip !docs libtool emptydirs) install=PKGBUILD -provides=('github-actions') -conflicts=('github-actions') - +provides=($_pkgname) +conflicts=($_pkgname) source=( - https://githubassets.azureedge.net/runners/$pkgver/actions-runner-linux-x64-$pkgver.tar.gz + https://github.com/actions/runner/releases/download/v$pkgver/actions-runner-linux-x64-$pkgver.tar.gz + github-actions.service + github-actions.tmpfiles + github-actions.sysusers ) -sha512sums=('711cdb99e6dc34e6cc843ef31befd2db49bfe0463f3da9550663ced9febb362cdf23d4976ce78455edad72d00dd0713114e13c46a5461c454a5a9fe5738b8639') +sha512sums=('f9bfd2756db57cee1632f3c1ea922974ad343cd4ad47753fcf8fd9e6afea2a2f9462715161e33bec29c270b92c4744dcc3564e290cff4dc02ea068fc57707e90' + 'abeb32b58cd526bb6abe928d978664de85cab5715d93189919412f889a8a1089a11ec1e8bf21e72e96e8640ca85ecb97daff0c797541317dbe4f6f508c39858d' + 'c0a8cc36b353f85d9e05868a20b160c0cd36d983bcb65562dd8c3f2c6321061deec18331156ec75f0b9d7b0009df7412abf2d977e6995cac004c5462282928a8' + '49329a3c65987f7bb219100b41deb33fcbc64f5e6424c4e31d580e2fbd408545d2d4a990c5511a3625250bd37ad7d13496cfd152ffd20de04fd24250242088d4') package() { - mkdir -p "$pkgdir/opt/$provides" - cp -r "$srcdir/." "$pkgdir/opt/$provides" - - install -m755 -d ${pkgdir}/usr/lib/systemd/system || return 1 - install -m644 $startdir/github-actions.service ${pkgdir}/usr/lib/systemd/system || return 1 -} + depends=(sudo) + mkdir -p "$pkgdir"/var/lib/$_pkgname -pre_install() { - useradd $provides || true -} + # Useless on pacman-based distributions + rm -f "$srcdir"/bin/installdependencies.sh -post_install() { - chown -R $provides:$provides /opt/$provides -} + cp -r -t "$pkgdir"/var/lib/$_pkgname "$srcdir"/{bin,externals,*.sh} -pre_upgrade() { - pre_install + # also see github-actions.tmpfiles + chmod 0775 "$pkgdir"/var/lib/$_pkgname + + # make ldd happy + chmod +x "$pkgdir"/var/lib/$_pkgname/bin/*.so + + install -Dm644 "$srcdir"/$_pkgname.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/$_pkgname.conf + install -Dm644 "$srcdir"/$_pkgname.sysusers "${pkgdir}"/usr/lib/sysusers.d/$_pkgname.conf + install -Dm644 "$srcdir"/$_pkgname.service "${pkgdir}"/usr/lib/systemd/system/$_pkgname.service } -post_upgrade() { - post_install +pre_remove() { + if systemctl -q is-enabled $_pkgname.service; then + systemctl disable $_pkgname.service + fi } post_remove() { - userdel -f $provides - rm -rf /opt/$provides + echo + echo "Remove $_pkgname user and this HOME /var/lib/$_pkgname manually, if not needed anymore." + echo } + |