cachy-auto-update: add package (1.0.0-1)
This commit is contained in:
1 parent
a6c7b5d8aa
commit
0e674fada3
5 files changed
+127
No files matched your search
@@ -0,0 +1,27 @@
|
||||
# cachy-auto-update - unattended background updates for CachyOS
|
||||
# (https://github.com/Felitendo/cachy-auto-update).
|
||||
#
|
||||
# Pure shell plus a gettext catalog and a scdoc man page, so the PKGBUILD just
|
||||
# runs the upstream Makefile against the release tarball. Nothing is prebuilt
|
||||
# and nothing is republished - the AUR package builds exactly what the tag
|
||||
# contains.
|
||||
|
||||
UPSTREAM_REPO="Felitendo/cachy-auto-update"
|
||||
|
||||
# Installed in CI (pacman) before the makepkg test build.
|
||||
BUILD_DEPS=(gettext scdoc)
|
||||
|
||||
latest_version() {
|
||||
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//'
|
||||
}
|
||||
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local sha
|
||||
|
||||
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/v$ver.tar.gz" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
|
||||
sed -i "s|^sha256sums=.*|sha256sums=('$sha')|" "$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user