Yavsc.PostIt Debian packaging
  • Shell 58%
  • Makefile 42%
Find a file
Paul Schneider cc48de0bea
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 5m16s
Makefile: dpkg-architecture -aarm64 for proper cross-build host arch
dpkg-buildpackage doesn't know about dotnet's --runtime flag.
It uses the host arch by default, so the cross-build for arm64
produced postit_*_amd64.deb (filename mismatch with the actual
arm64 .so content inside).

The Debian-blessed way to do cross-builds is to set DEB_HOST_ARCH
via dpkg-architecture. With -aarm64, dpkg-buildpackage will:
- name the .deb postit_*_arm64.deb
- accept the amd64 host as the build environment
- run debhelper rules with the right DEB_* variables exported

The vars from dpkg-architecture have to be exported into the
same shell as dpkg-buildpackage (each make recipe line runs in
its own shell), so eval and dpkg-buildpackage are chained with
'\\' continuation.

The warning 'GNU system type aarch64-linux-gnu does not match
the CC system type x86_64-linux-gnu' is informational — it just
acknowledges that we're cross-compiling. We don't compile C, so
no CC toolchain is needed.
2026-08-17 17:48:47 +01:00
.forgejo/workflows release.yml: arm64 build with set -x + explicit exit on make failure 2026-08-17 17:28:34 +01:00
debian debian/rules: drop override_dh_strip entirely 2026-08-17 16:52:18 +01:00
tests postit-debian: support POSTIT_GIT_TAG as a tag (not just a branch) 2026-06-28 13:47:15 +01:00
.gitignore packaging: derive Debian version from POSTIT_GIT_TAG via a changelog template 2026-06-28 13:20:17 +01:00
CHANGELOG.md release 1.0.6: bump packaging defaults, add CHANGELOG, CI workflow 2026-08-17 14:53:07 +01:00
Makefile Makefile: dpkg-architecture -aarm64 for proper cross-build host arch 2026-08-17 17:48:47 +01:00
README.md debian+makefile: expose POSTIT_RUNTIME override for arm64 builds 2026-06-28 00:51:14 +01:00

postit-debian

Paquet Debian pour PostIt.Desktop, le client desktop Avalonia de la plateforme Yavsc.Org.

Le paquet expose la commande postit sur le système, installe l'entrée .desktop dans le menu, et enregistre le scheme URI postit:// comme MIME handler (utilisé par l'OIDC Authorization Code + PKCE pour le hand-off du callback — RFC 8252 §7.1).

Cible : Debian 13 (trixie). Testé également sur Ubuntu 24.04 LTS (equivalent ABI).

Construction

Pré-requis :

sudo apt install build-essential debhelper imagemagick librsvg2-bin \
    dotnet-sdk-10.0 git

Sur Debian 13, installer .NET 10 depuis le dépôt officiel Microsoft :

wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb \
    -O /tmp/ms-prod.deb
sudo dpkg -i /tmp/ms-prod.deb
sudo apt update
sudo apt install dotnet-sdk-10.0

Puis :

make deb

Le .deb atterrit dans le répertoire parent (ou $POSTIT_OUT_DIR).

Pour bumper la version amont sans modifier ce dépôt :

make deb POSTIT_GIT_TAG=1.0.1
make deb POSTIT_GIT_URL=https://github.com/fork/yavsc.git POSTIT_GIT_TAG=my-branch

Installation

sudo apt install ./postit_1.0.0-1_amd64.deb

ou directement :

sudo dpkg -i postit_1.0.0-1_amd64.deb
sudo apt -f install     # résout les dépendances manquantes

Pour installer sur arm64 :

# Sur une machine arm64 :
make clean && make deb   # le .deb sera _arm64.deb

Le debian/rules publie avec --runtime linux-x64 pour amd64. Pour produire un .deb arm64, override :

make deb POSTIT_RUNTIME=linux-arm64

(le paramètre est exposé par debian/rules ; bump à ajouter si besoin). À noter : un seul runtime par build — le --runtime exclut les autres plateformes, donc le .deb est portable mais mono-architecture.

Vérification

Après installation :

$ which postit
/usr/bin/postit
$ postit --help          # (l'application Avalonia ouvre sa fenêtre)
$ xdg-mime query default x-scheme-handler/postit
postit.desktop
$ xdg-open postit://callback?code=test

Le scheme handler lance PostIt avec l'URL en argument. En interne, PostIt (PostIt.Desktop) appelle SingleInstance.TryHandOffAsync puis sort, transferrant l'URL au process PostIt déjà actif via un named pipe.

Désinstallation

sudo apt remove postit

Le postrm du paquet rafraîchit la base .desktop. Le scheme handler postit:// n'est pas explicitement désenregistré (système — par utilisateur c'est xdg-mime default ...).

Maintenance

  • Bumper debian/changelog à chaque release, conformément à la Debian Policy §4.4 (entries datées, signées par le mainteneur).
  • Mettre à jour POSTIT_GIT_TAG par défaut dans debian/rules et Makefile à chaque release amont.
  • Rebuild après changement de licence amont.

Liens