nextcloud-native, nextcloud-native-git: new packages
Source package built from the release tag and a VCS package following main, both from :ui:createDistributable - the same jpackage application image that nextcloud-native-bin repackages from upstream's .deb. nextcloud-native-git is not version-tracked: its pkgver comes from pkgver() at build time, so latest_version() reports the snapshot already in the PKGBUILD and the update run stays a no-op until the packaging itself changes.
This commit is contained in:
1 parent
f56ad82386
commit
6d73022529
7 files changed
+334
-1
No files matched your search
@@ -48,7 +48,9 @@ source in the `PKGBUILD` (and drop the `-bin` suffix), or don't package it.
|
|||||||
| `lunar-client-bin` | [lunarclient.com](https://lunarclient.com) — Minecraft PvP modpack launcher | AppImage | [lunar-client-bin](https://aur.archlinux.org/packages/lunar-client-bin) |
|
| `lunar-client-bin` | [lunarclient.com](https://lunarclient.com) — Minecraft PvP modpack launcher | AppImage | [lunar-client-bin](https://aur.archlinux.org/packages/lunar-client-bin) |
|
||||||
| `middleclick-autoscroll` | [Felitendo/middleclick-autoscroll](https://github.com/Felitendo/middleclick-autoscroll) — enables middle-click autoscroll in every application that supports it | *built from source* | [middleclick-autoscroll](https://aur.archlinux.org/packages/middleclick-autoscroll) |
|
| `middleclick-autoscroll` | [Felitendo/middleclick-autoscroll](https://github.com/Felitendo/middleclick-autoscroll) — enables middle-click autoscroll in every application that supports it | *built from source* | [middleclick-autoscroll](https://aur.archlinux.org/packages/middleclick-autoscroll) |
|
||||||
| `modrinth-app-bin` | [modrinth/code](https://github.com/modrinth/code) — Minecraft mod manager/launcher | `.deb` | [modrinth-app-bin](https://aur.archlinux.org/packages/modrinth-app-bin) |
|
| `modrinth-app-bin` | [modrinth/code](https://github.com/modrinth/code) — Minecraft mod manager/launcher | `.deb` | [modrinth-app-bin](https://aur.archlinux.org/packages/modrinth-app-bin) |
|
||||||
| `nextcloud-native-bin` | [Obiente/nc-native](https://github.com/Obiente/nc-native) — adaptive native Nextcloud client for files, media and installed server apps (Compose Multiplatform, unofficial) | `.deb` | [nextcloud-native-bin](https://aur.archlinux.org/packages/nextcloud-native-bin) |
|
| `nextcloud-native` | [Obiente/nc-native](https://github.com/Obiente/nc-native) — adaptive native Nextcloud client for files, media and installed server apps (Compose Multiplatform, unofficial) | *built from source* | [nextcloud-native](https://aur.archlinux.org/packages/nextcloud-native) |
|
||||||
|
| `nextcloud-native-bin` | [Obiente/nc-native](https://github.com/Obiente/nc-native) — prebuilt release of `nextcloud-native` | `.deb` | [nextcloud-native-bin](https://aur.archlinux.org/packages/nextcloud-native-bin) |
|
||||||
|
| `nextcloud-native-git` | [Obiente/nc-native](https://github.com/Obiente/nc-native) — `main` branch of `nextcloud-native` | *built from source* | [nextcloud-native-git](https://aur.archlinux.org/packages/nextcloud-native-git) |
|
||||||
| `sharpemu-bin` | [sharpemu/sharpemu](https://github.com/sharpemu/sharpemu) — experimental PlayStation 5 emulator | tarball | [sharpemu-bin](https://aur.archlinux.org/packages/sharpemu-bin) |
|
| `sharpemu-bin` | [sharpemu/sharpemu](https://github.com/sharpemu/sharpemu) — experimental PlayStation 5 emulator | tarball | [sharpemu-bin](https://aur.archlinux.org/packages/sharpemu-bin) |
|
||||||
| `snapx-bin` | [SnapXL/SnapX](https://github.com/SnapXL/SnapX) — ShareX-fork screenshot/sharing tool | self-contained tarball | [snapx-bin](https://aur.archlinux.org/packages/snapx-bin) |
|
| `snapx-bin` | [SnapXL/SnapX](https://github.com/SnapXL/SnapX) — ShareX-fork screenshot/sharing tool | self-contained tarball | [snapx-bin](https://aur.archlinux.org/packages/snapx-bin) |
|
||||||
| `timetable` | [ostfriese4/untis](https://codeberg.org/ostfriese4/untis) — "Timetable", a GTK4 + LibAdwaita client for WebUntis | *built from source* | [timetable](https://aur.archlinux.org/packages/timetable) |
|
| `timetable` | [ostfriese4/untis](https://codeberg.org/ostfriese4/untis) — "Timetable", a GTK4 + LibAdwaita client for WebUntis | *built from source* | [timetable](https://aur.archlinux.org/packages/timetable) |
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
pkgbase = nextcloud-native-git
|
||||||
|
pkgdesc = Adaptive native client for Nextcloud files, media and apps (git)
|
||||||
|
pkgver = 0.1.0.alpha.2.r31.gdcfde9b
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://nc-native.obiente.dev
|
||||||
|
arch = x86_64
|
||||||
|
license = AGPL-3.0-or-later
|
||||||
|
makedepends = jdk21-openjdk
|
||||||
|
makedepends = python
|
||||||
|
makedepends = git
|
||||||
|
depends = alsa-lib
|
||||||
|
depends = brotli
|
||||||
|
depends = bzip2
|
||||||
|
depends = expat
|
||||||
|
depends = fontconfig
|
||||||
|
depends = freetype2
|
||||||
|
depends = gcc-libs
|
||||||
|
depends = glibc
|
||||||
|
depends = hicolor-icon-theme
|
||||||
|
depends = libbsd
|
||||||
|
depends = libglvnd
|
||||||
|
depends = libmd
|
||||||
|
depends = libpng
|
||||||
|
depends = libsecret
|
||||||
|
depends = libx11
|
||||||
|
depends = libxau
|
||||||
|
depends = libxcb
|
||||||
|
depends = libxdmcp
|
||||||
|
depends = libxext
|
||||||
|
depends = libxi
|
||||||
|
depends = libxrender
|
||||||
|
depends = libxtst
|
||||||
|
depends = xdg-utils
|
||||||
|
depends = zlib
|
||||||
|
optdepends = gnome-keyring: Secret Service provider for stored accounts
|
||||||
|
optdepends = kwallet: Secret Service provider for stored accounts on Plasma
|
||||||
|
optdepends = fuse2: mount an account as a virtual file system
|
||||||
|
provides = nextcloud-native
|
||||||
|
conflicts = nextcloud-native
|
||||||
|
options = !strip
|
||||||
|
options = !debug
|
||||||
|
source = nextcloud-native-git::git+https://github.com/Obiente/nc-native.git
|
||||||
|
sha256sums = SKIP
|
||||||
|
|
||||||
|
pkgname = nextcloud-native-git
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# Maintainer: Felitendo
|
||||||
|
# This PKGBUILD is updated automatically:
|
||||||
|
# https://github.com/Felitendo/PKGBUILDS
|
||||||
|
|
||||||
|
pkgname=nextcloud-native-git
|
||||||
|
pkgver=0.1.0.alpha.2.r31.gdcfde9b
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Adaptive native client for Nextcloud files, media and apps (git)"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://nc-native.obiente.dev"
|
||||||
|
license=('AGPL-3.0-or-later')
|
||||||
|
# createDistributable produces a jpackage application image with its own jlink
|
||||||
|
# runtime, so the shared libraries that runtime needs are the only depends.
|
||||||
|
depends=('alsa-lib' 'brotli' 'bzip2' 'expat' 'fontconfig' 'freetype2'
|
||||||
|
'gcc-libs' 'glibc' 'hicolor-icon-theme' 'libbsd' 'libglvnd' 'libmd'
|
||||||
|
'libpng' 'libsecret' 'libx11' 'libxau' 'libxcb' 'libxdmcp' 'libxext'
|
||||||
|
'libxi' 'libxrender' 'libxtst' 'xdg-utils' 'zlib')
|
||||||
|
# The Android SDK, Rust and Node.js that CONTRIBUTING.md lists are needed for
|
||||||
|
# the mobile target, the Windows shell helper and the website. The Linux
|
||||||
|
# desktop image builds with JDK 21 alone; python renders the AppStream file.
|
||||||
|
makedepends=('jdk21-openjdk' 'python' 'git')
|
||||||
|
optdepends=('gnome-keyring: Secret Service provider for stored accounts'
|
||||||
|
'kwallet: Secret Service provider for stored accounts on Plasma'
|
||||||
|
'fuse2: mount an account as a virtual file system')
|
||||||
|
options=('!strip' '!debug')
|
||||||
|
provides=('nextcloud-native')
|
||||||
|
conflicts=('nextcloud-native')
|
||||||
|
source=("${pkgname}::git+https://github.com/Obiente/nc-native.git")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$pkgname"
|
||||||
|
# nightly-* tags would swallow every describe, so match the version tags only
|
||||||
|
git describe --long --abbrev=7 --match 'v[0-9]*' \
|
||||||
|
| sed 's/^v//; s/\([^-]*-g\)/r\1/; s/-/./g'
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname"
|
||||||
|
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
|
||||||
|
# keep Gradle's cache inside the build tree instead of ~/.gradle
|
||||||
|
export GRADLE_USER_HOME="$srcdir/gradle-home"
|
||||||
|
|
||||||
|
# Gradle resolves the dependency graph from Maven Central and Google's
|
||||||
|
# repository during this step, so build() needs network access.
|
||||||
|
./gradlew --no-daemon --console=plain :ui:createDistributable
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$pkgname"
|
||||||
|
|
||||||
|
install -d "$pkgdir/opt/nextcloudnative"
|
||||||
|
cp -a ui/build/compose/binaries/main/app/NextcloudNative/. \
|
||||||
|
"$pkgdir/opt/nextcloudnative/"
|
||||||
|
|
||||||
|
# the launcher resolves its own directory through /proc/self/exe, so a
|
||||||
|
# symlink into /usr/bin keeps the application image self-contained
|
||||||
|
install -d "$pkgdir/usr/bin"
|
||||||
|
ln -s /opt/nextcloudnative/bin/NextcloudNative "$pkgdir/usr/bin/nextcloud-native"
|
||||||
|
|
||||||
|
# upstream's jpackage template, with the launcher path jpackage would fill in
|
||||||
|
sed "s|^Exec=.*|Exec=/opt/nextcloudnative/bin/NextcloudNative|" \
|
||||||
|
release/linux/jpackage/NextcloudNative.desktop \
|
||||||
|
> "$srcdir/nextcloudnative-NextcloudNative.desktop"
|
||||||
|
install -Dm644 "$srcdir/nextcloudnative-NextcloudNative.desktop" \
|
||||||
|
"$pkgdir/usr/share/applications/nextcloudnative-NextcloudNative.desktop"
|
||||||
|
|
||||||
|
install -Dm644 ui/src/desktopMain/resources/nextcloud-native.png \
|
||||||
|
"$pkgdir/usr/share/icons/hicolor/512x512/apps/dev.obiente.nextcloudnative.png"
|
||||||
|
|
||||||
|
# same renderer the packageDeb path uses, fed from gradle.properties so the
|
||||||
|
# metadata cannot drift away from the tag being built
|
||||||
|
python3 tools/render-linux-appstream-metadata.py \
|
||||||
|
release/linux/dev.obiente.nextcloudnative.metainfo.xml \
|
||||||
|
"$pkgdir/usr/share/metainfo/dev.obiente.nextcloudnative.metainfo.xml" \
|
||||||
|
"$(grep -Po '^ncDesktopPackageVersion=\K.*' gradle.properties)" \
|
||||||
|
"$(grep -Po '^ncVersionName=\K.*' gradle.properties)" \
|
||||||
|
"$(date -u -d "@$SOURCE_DATE_EPOCH" +%F)"
|
||||||
|
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# nextcloud-native-git - Nextcloud Native (https://github.com/Obiente/nc-native)
|
||||||
|
# built from the main branch. Same build as nextcloud-native, see that package
|
||||||
|
# for why the Linux desktop image needs nothing but JDK 21.
|
||||||
|
#
|
||||||
|
# VCS packages are not version-tracked here on purpose. The AUR copy of a -git
|
||||||
|
# PKGBUILD carries only a snapshot of pkgver; the real version comes from
|
||||||
|
# pkgver() when the user builds it. Upstream pushes several times a day, so
|
||||||
|
# following main here would mean several AUR pushes a day that change nothing
|
||||||
|
# for anyone. latest_version() therefore reports the pkgver that is already in
|
||||||
|
# the PKGBUILD, which makes the update run a no-op: the package is rebuilt,
|
||||||
|
# re-checked and pushed only when the packaging itself changes.
|
||||||
|
#
|
||||||
|
# When that happens, makepkg refreshes the pkgver snapshot in the PKGBUILD as
|
||||||
|
# part of the test build, so the committed snapshot follows along by itself.
|
||||||
|
|
||||||
|
# Installed in CI (pacman) before the makepkg test build.
|
||||||
|
BUILD_DEPS=(jdk21-openjdk python git)
|
||||||
|
|
||||||
|
latest_version() {
|
||||||
|
grep -Po '^pkgver=\K.*' "$(dirname "${BASH_SOURCE[0]}")/PKGBUILD"
|
||||||
|
}
|
||||||
|
|
||||||
|
# refresh_checksums <version> <pkgbuild-path>
|
||||||
|
# Unreachable: latest_version() never reports a version other than the current
|
||||||
|
# one. The git source carries SKIP checksums, so there would be nothing to do.
|
||||||
|
refresh_checksums() {
|
||||||
|
:
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
pkgbase = nextcloud-native
|
||||||
|
pkgdesc = Adaptive native client for Nextcloud files, media and apps
|
||||||
|
pkgver = 0.1.0alpha.2
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://nc-native.obiente.dev
|
||||||
|
arch = x86_64
|
||||||
|
license = AGPL-3.0-or-later
|
||||||
|
makedepends = jdk21-openjdk
|
||||||
|
makedepends = python
|
||||||
|
depends = alsa-lib
|
||||||
|
depends = brotli
|
||||||
|
depends = bzip2
|
||||||
|
depends = expat
|
||||||
|
depends = fontconfig
|
||||||
|
depends = freetype2
|
||||||
|
depends = gcc-libs
|
||||||
|
depends = glibc
|
||||||
|
depends = hicolor-icon-theme
|
||||||
|
depends = libbsd
|
||||||
|
depends = libglvnd
|
||||||
|
depends = libmd
|
||||||
|
depends = libpng
|
||||||
|
depends = libsecret
|
||||||
|
depends = libx11
|
||||||
|
depends = libxau
|
||||||
|
depends = libxcb
|
||||||
|
depends = libxdmcp
|
||||||
|
depends = libxext
|
||||||
|
depends = libxi
|
||||||
|
depends = libxrender
|
||||||
|
depends = libxtst
|
||||||
|
depends = xdg-utils
|
||||||
|
depends = zlib
|
||||||
|
optdepends = gnome-keyring: Secret Service provider for stored accounts
|
||||||
|
optdepends = kwallet: Secret Service provider for stored accounts on Plasma
|
||||||
|
optdepends = fuse2: mount an account as a virtual file system
|
||||||
|
options = !strip
|
||||||
|
options = !debug
|
||||||
|
source = nextcloud-native-0.1.0alpha.2.tar.gz::https://github.com/Obiente/nc-native/archive/refs/tags/v0.1.0-alpha.2.tar.gz
|
||||||
|
sha256sums = 7ec5b795778668f133f0fe3d3e41e11b4fcb0c2e825c794c3915d791af14f920
|
||||||
|
|
||||||
|
pkgname = nextcloud-native
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
# Maintainer: Felitendo
|
||||||
|
# This PKGBUILD is updated automatically:
|
||||||
|
# https://github.com/Felitendo/PKGBUILDS
|
||||||
|
|
||||||
|
pkgname=nextcloud-native
|
||||||
|
pkgver=0.1.0alpha.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Adaptive native client for Nextcloud files, media and apps"
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://nc-native.obiente.dev"
|
||||||
|
license=('AGPL-3.0-or-later')
|
||||||
|
# createDistributable produces a jpackage application image with its own jlink
|
||||||
|
# runtime, so the shared libraries that runtime needs are the only depends.
|
||||||
|
depends=('alsa-lib' 'brotli' 'bzip2' 'expat' 'fontconfig' 'freetype2'
|
||||||
|
'gcc-libs' 'glibc' 'hicolor-icon-theme' 'libbsd' 'libglvnd' 'libmd'
|
||||||
|
'libpng' 'libsecret' 'libx11' 'libxau' 'libxcb' 'libxdmcp' 'libxext'
|
||||||
|
'libxi' 'libxrender' 'libxtst' 'xdg-utils' 'zlib')
|
||||||
|
# The Android SDK, Rust and Node.js that CONTRIBUTING.md lists are needed for
|
||||||
|
# the mobile target, the Windows shell helper and the website. The Linux
|
||||||
|
# desktop image builds with JDK 21 alone; python renders the AppStream file.
|
||||||
|
makedepends=('jdk21-openjdk' 'python')
|
||||||
|
optdepends=('gnome-keyring: Secret Service provider for stored accounts'
|
||||||
|
'kwallet: Secret Service provider for stored accounts on Plasma'
|
||||||
|
'fuse2: mount an account as a virtual file system')
|
||||||
|
options=('!strip' '!debug')
|
||||||
|
# Upstream has no stable release yet; only the versioned tags are packaged.
|
||||||
|
# pkgver drops the hyphen from the tag; see pkg.sh.
|
||||||
|
_tag="v0.1.0-alpha.2"
|
||||||
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Obiente/nc-native/archive/refs/tags/${_tag}.tar.gz")
|
||||||
|
sha256sums=('7ec5b795778668f133f0fe3d3e41e11b4fcb0c2e825c794c3915d791af14f920')
|
||||||
|
|
||||||
|
_srcname="nc-native-${_tag#v}"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$_srcname"
|
||||||
|
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
|
||||||
|
# keep Gradle's cache inside the build tree instead of ~/.gradle
|
||||||
|
export GRADLE_USER_HOME="$srcdir/gradle-home"
|
||||||
|
|
||||||
|
# Gradle resolves the dependency graph from Maven Central and Google's
|
||||||
|
# repository during this step, so build() needs network access.
|
||||||
|
./gradlew --no-daemon --console=plain :ui:createDistributable
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$_srcname"
|
||||||
|
|
||||||
|
install -d "$pkgdir/opt/nextcloudnative"
|
||||||
|
cp -a ui/build/compose/binaries/main/app/NextcloudNative/. \
|
||||||
|
"$pkgdir/opt/nextcloudnative/"
|
||||||
|
|
||||||
|
# the launcher resolves its own directory through /proc/self/exe, so a
|
||||||
|
# symlink into /usr/bin keeps the application image self-contained
|
||||||
|
install -d "$pkgdir/usr/bin"
|
||||||
|
ln -s /opt/nextcloudnative/bin/NextcloudNative "$pkgdir/usr/bin/nextcloud-native"
|
||||||
|
|
||||||
|
# upstream's jpackage template, with the launcher path jpackage would fill in
|
||||||
|
sed "s|^Exec=.*|Exec=/opt/nextcloudnative/bin/NextcloudNative|" \
|
||||||
|
release/linux/jpackage/NextcloudNative.desktop \
|
||||||
|
> "$srcdir/nextcloudnative-NextcloudNative.desktop"
|
||||||
|
install -Dm644 "$srcdir/nextcloudnative-NextcloudNative.desktop" \
|
||||||
|
"$pkgdir/usr/share/applications/nextcloudnative-NextcloudNative.desktop"
|
||||||
|
|
||||||
|
install -Dm644 ui/src/desktopMain/resources/nextcloud-native.png \
|
||||||
|
"$pkgdir/usr/share/icons/hicolor/512x512/apps/dev.obiente.nextcloudnative.png"
|
||||||
|
|
||||||
|
# same renderer the packageDeb path uses, fed from gradle.properties so the
|
||||||
|
# metadata cannot drift away from the tag being built
|
||||||
|
python3 tools/render-linux-appstream-metadata.py \
|
||||||
|
release/linux/dev.obiente.nextcloudnative.metainfo.xml \
|
||||||
|
"$pkgdir/usr/share/metainfo/dev.obiente.nextcloudnative.metainfo.xml" \
|
||||||
|
"$(grep -Po '^ncDesktopPackageVersion=\K.*' gradle.properties)" \
|
||||||
|
"$(grep -Po '^ncVersionName=\K.*' gradle.properties)" \
|
||||||
|
"$(date -u -d "@$SOURCE_DATE_EPOCH" +%F)"
|
||||||
|
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# nextcloud-native - Nextcloud Native (https://github.com/Obiente/nc-native),
|
||||||
|
# an adaptive native Nextcloud client built with Kotlin/Compose Multiplatform.
|
||||||
|
#
|
||||||
|
# Source package: the PKGBUILD builds :ui:createDistributable from the release
|
||||||
|
# tarball, which is the same jpackage application image upstream wraps into the
|
||||||
|
# .deb that nextcloud-native-bin repackages.
|
||||||
|
#
|
||||||
|
# CONTRIBUTING.md lists an Android SDK, Rust and Node.js as prerequisites, but
|
||||||
|
# those cover the mobile target, the Windows Explorer helper and the website.
|
||||||
|
# The Linux desktop image builds with JDK 21 alone - verified against
|
||||||
|
# v0.1.0-alpha.2 with ANDROID_HOME and ANDROID_SDK_ROOT unset.
|
||||||
|
#
|
||||||
|
# Release/version handling is identical to nextcloud-native-bin: every upstream
|
||||||
|
# release is a prerelease and the list is dominated by per-build nightly-* and
|
||||||
|
# rolling channel-* releases, so only the versioned v* tags are packaged, and
|
||||||
|
# pkgver drops the hyphen (v0.1.0-alpha.2 -> 0.1.0alpha.2), which pacman sorts
|
||||||
|
# older than a later plain 0.1.0, so no epoch is needed. See
|
||||||
|
# nextcloud-native-bin/pkg.sh.
|
||||||
|
|
||||||
|
UPSTREAM_REPO="Obiente/nc-native"
|
||||||
|
|
||||||
|
# Installed in CI (pacman) before the makepkg test build.
|
||||||
|
BUILD_DEPS=(jdk21-openjdk python)
|
||||||
|
|
||||||
|
latest_tag() {
|
||||||
|
gh api "repos/$UPSTREAM_REPO/releases?per_page=100" \
|
||||||
|
--jq '[.[] | select(.tag_name | test("^v[0-9]"))] | .[0].tag_name'
|
||||||
|
}
|
||||||
|
|
||||||
|
tag_to_pkgver() {
|
||||||
|
sed 's/^v//; s/-//g'
|
||||||
|
}
|
||||||
|
|
||||||
|
latest_version() {
|
||||||
|
latest_tag | tag_to_pkgver
|
||||||
|
}
|
||||||
|
|
||||||
|
# refresh_checksums <version> <pkgbuild-path>
|
||||||
|
refresh_checksums() {
|
||||||
|
local ver="$1" pkgbuild="$2"
|
||||||
|
local tag sha
|
||||||
|
|
||||||
|
tag="$(latest_tag)"
|
||||||
|
if [[ "$(tag_to_pkgver <<< "$tag")" != "$ver" ]]; then
|
||||||
|
echo "newest versioned release is $tag, not the requested $ver - try again" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/$tag.tar.gz" \
|
||||||
|
| sha256sum | cut -d' ' -f1)"
|
||||||
|
|
||||||
|
sed -i \
|
||||||
|
-e "s|^_tag=.*|_tag=\"$tag\"|" \
|
||||||
|
-e "s|^sha256sums=.*|sha256sums=('$sha')|" \
|
||||||
|
"$pkgbuild"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user