Files
margin-calendar/packaging/aur/PKGBUILD.in
T
pj fef1ad7ff5 Publish an Arch package to the AUR from the release
The AppImage runs on Arch but not as a Wayland client. It carries Ubuntu's
GTK stack including libwayland-client, which cannot talk to a current
compositor, so on Hyprland it fails to initialise GTK and only starts once it
falls back to Xwayland. Verified both ways on a real session: the AppImage
comes up with xwayland 1, the packaged build with xwayland 0.

margin-calendar-bin repackages the published .deb rather than building from
source, which is forced rather than lazy. The Google OAuth client is embedded
at compile time from a file that is not in the repo, so a source package
would build cleanly on a stranger's machine and then tell them Google
Calendar is not set up.

The job runs after the manifest check, so the AUR can only ever point at a
release that survived it, and it checksums the artifact it just downloaded
rather than one it assumed was there. Without AUR_SSH_PRIVATE_KEY it renders
the package, warns, and leaves the release alone.

license=('custom') is honest rather than chosen: this repo has no licence
file. That is worth fixing before anyone else packages it.
2026-08-12 20:59:21 +05:30

33 lines
1.5 KiB
Plaintext

# Maintainer: PJ <[email protected]>
# The template the release workflow renders. @VERSION@ and @SHA256@ are filled in from the release
# that has just published, so the PKGBUILD on the AUR always points at an artifact that exists.
#
# A binary package rather than one built from source, and that is forced rather than lazy: the
# Google OAuth client is embedded at compile time from a file that is not in the repo, so anything
# built from source on a stranger's machine runs and then says Google Calendar is not set up.
pkgname=margin-calendar-bin
pkgver=@VERSION@
pkgrel=1
pkgdesc="A calendar for Google Calendar, where the grid owns the window and the day fits without scrolling"
arch=('x86_64')
url="https://github.com/priyanshujain/margin-calendar"
license=('custom')
depends=('webkit2gtk-4.1' 'gtk3')
provides=('margin-calendar')
conflicts=('margin-calendar')
# Prebuilt and already linked: stripping it again buys nothing and risks the binary.
options=('!strip' '!debug')
source=("${pkgname}-${pkgver}.deb::${url}/releases/download/v${pkgver}/Margin.Calendar_${pkgver}_amd64.deb")
noextract=("${pkgname}-${pkgver}.deb")
sha256sums=('@SHA256@')
package() {
bsdtar -xOf "${pkgname}-${pkgver}.deb" data.tar.gz | bsdtar -xf - -C "${pkgdir}"
# The bundler names it after the product, spaces and all. Everything that reads this directory
# copes with that, and nothing that reads it enjoys it.
mv "${pkgdir}/usr/share/applications/Margin Calendar.desktop" \
"${pkgdir}/usr/share/applications/margin-calendar.desktop"
}