Add timetable-bin with automated AUR update workflow
This commit is contained in:
commit
6f7398075a
7 files changed
+345
No files matched your search
@@ -0,0 +1,22 @@
|
||||
pkgbase = timetable-bin
|
||||
pkgdesc = GTK4 + LibAdwaita client for WebUntis (prebuilt, bundles python-webuntis)
|
||||
pkgver = 3.1
|
||||
pkgrel = 1
|
||||
url = https://codeberg.org/ostfriese4/untis
|
||||
arch = any
|
||||
license = GPL-3.0-or-later
|
||||
depends = gtk4
|
||||
depends = libadwaita
|
||||
depends = python
|
||||
depends = python-gobject
|
||||
depends = python-requests
|
||||
depends = glib2
|
||||
depends = hicolor-icon-theme
|
||||
provides = untis
|
||||
provides = timetable
|
||||
conflicts = untis
|
||||
conflicts = timetable
|
||||
source = https://github.com/Felitendo/PKGBUILDS/releases/download/timetable-bin-3.1/timetable-bin-3.1.tar.zst
|
||||
sha256sums = ffd735d1a08204fe18e563815813b3a62f7625bce5bd5d4c086f1456422e0590
|
||||
|
||||
pkgname = timetable-bin
|
||||
@@ -0,0 +1,20 @@
|
||||
# Maintainer: Felitendo
|
||||
# This PKGBUILD is updated automatically:
|
||||
# https://github.com/Felitendo/PKGBUILDS
|
||||
|
||||
pkgname=timetable-bin
|
||||
pkgver=3.1
|
||||
pkgrel=1
|
||||
pkgdesc="GTK4 + LibAdwaita client for WebUntis (prebuilt, bundles python-webuntis)"
|
||||
arch=('any')
|
||||
url="https://codeberg.org/ostfriese4/untis"
|
||||
license=('GPL-3.0-or-later')
|
||||
depends=('gtk4' 'libadwaita' 'python' 'python-gobject' 'python-requests' 'glib2' 'hicolor-icon-theme')
|
||||
provides=('untis' 'timetable')
|
||||
conflicts=('untis' 'timetable')
|
||||
source=("https://github.com/Felitendo/PKGBUILDS/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.zst")
|
||||
sha256sums=('ffd735d1a08204fe18e563815813b3a62f7625bce5bd5d4c086f1456422e0590')
|
||||
|
||||
package() {
|
||||
cp -a "$srcdir/usr" "$pkgdir/"
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
# timetable-bin - prebuilt package of https://codeberg.org/ostfriese4/untis
|
||||
# ("Timetable", a GTK4 + LibAdwaita WebUntis client written in Python).
|
||||
#
|
||||
# Upstream publishes no binary release assets, so build_artifact() builds the
|
||||
# app from the release tarball and the resulting install tree is published as
|
||||
# a GitHub release asset of this repository, which the PKGBUILD then uses.
|
||||
|
||||
UPSTREAM_REPO="ostfriese4/untis"
|
||||
|
||||
# Installed in CI (pacman) before build_artifact runs.
|
||||
BUILD_DEPS=(meson ninja glib2 glib2-devel gtk4 libadwaita python python-gobject python-pip gettext)
|
||||
|
||||
latest_version() {
|
||||
curl -sf "https://codeberg.org/api/v1/repos/$UPSTREAM_REPO/releases/latest" \
|
||||
| jq -r '.tag_name' | sed 's/^v//'
|
||||
}
|
||||
|
||||
# build_artifact <version> <output-file>
|
||||
build_artifact() {
|
||||
local ver="$1" outfile="$2"
|
||||
local workdir destdir
|
||||
workdir="$(mktemp -d)"
|
||||
destdir="$(mktemp -d)"
|
||||
|
||||
curl -sfL "https://codeberg.org/$UPSTREAM_REPO/archive/v$ver.tar.gz" | tar -xz -C "$workdir"
|
||||
|
||||
# Upstream does not maintain the version in meson.build; use the release tag
|
||||
# so the About dialog shows the right version.
|
||||
sed -i "0,/version:/s/version: *'[^']*'/version: '$ver'/" "$workdir/untis/meson.build"
|
||||
|
||||
meson setup "$workdir/build" "$workdir/untis" --prefix=/usr --buildtype=release
|
||||
meson install -C "$workdir/build" --destdir "$destdir"
|
||||
|
||||
# Bundle the pure-python webuntis library: it is packaged neither in the
|
||||
# Arch repos nor on the AUR. /usr/share/untis is on the launcher's sys.path.
|
||||
pip download --no-deps --only-binary :all: --dest "$workdir/wheels" webuntis
|
||||
python -m zipfile -e "$workdir"/wheels/webuntis-*.whl "$destdir/usr/share/untis/"
|
||||
|
||||
# These caches are generated by pacman hooks; shipping them would cause
|
||||
# file conflicts on install.
|
||||
rm -f "$destdir/usr/share/glib-2.0/schemas/gschemas.compiled" \
|
||||
"$destdir/usr/share/applications/mimeinfo.cache" \
|
||||
"$destdir/usr/share/icons/hicolor/icon-theme.cache"
|
||||
|
||||
tar --zstd --sort=name --owner=0 --group=0 --numeric-owner --mtime='@0' \
|
||||
-cf "$outfile" -C "$destdir" usr
|
||||
|
||||
rm -rf "$workdir" "$destdir"
|
||||
}
|
||||
Reference in new issue
Block a user