feat(pacmanage): PacManager 1.4.1, with the AUR source

Vendored tarball replaced, 1.2.1 dropped. Upstream gains a third package
source, the AUR, plus an operation history, a readable log and an update check
against the Gitea repository.

Plugins are now collected instead of listed. CMake's POST_BUILD rule drops
every MODULE library it builds into build/plugins/, and PluginManager simply
scans *.so there, so a fixed path meant editing this PKGBUILD for each new
upstream provider. The AUR one arriving in 1.4 was exactly that.

The version file is installed next to the binary. UpdateManager::currentVersion
reads it and keeps the higher of that value and the one compiled in; upstream
installs it too. Leaving it out is harmless while the two agree, but they would
drift at the next bump.

pkgver follows the source's own version file, not the name of the delivery
folder, which said 1.4.2. CMake compiles that value into the binary and
UpdateManager compares it to the Gitea releases: a pkgver above the version
file would offer an already installed release for ever.

Qt6 Network is now required alongside Widgets; qt6-base covers both, so
depends is unchanged. yay and paru join optdepends since AurManager looks for
one of them and reports the source unavailable otherwise. FWS ships neither
yet, so that source will show as unavailable until one is added.

The FWS desktop entry is kept over the one upstream now generates. Upstream's
points at ${prefix}/bin/PacManager, a path this package does not have because
it keeps the binary in /usr/lib/fws-pacmanage/ next to its plugins, and its
icon is a 24px interface glyph with a hardcoded light stroke, invisible in a
menu on a light theme.

Both plugin sources compile; the full build needs Qt6, absent here.

Signed-off-by: nocode <suzuku295@gmail.com>
This commit is contained in:
nocode committed 2026-09-14 10:57:59 +02:00
1 parent 99b135426f
commit ab7f458d63
4 files changed
+62 -28

No files matched your search

+52 -22
View File
@@ -9,23 +9,33 @@
# #
# MISE À JOUR : # MISE À JOUR :
# 1. bump du fichier « version » côté FWS-PacManage # 1. bump du fichier « version » côté FWS-PacManage
# 2. tar -C <parent> -czf pkgbuilds/fws-pacmanage/fws-pacmanage-<v>.tar.gz \ # 2. tar --transform 's,^fws-pacmanage,fws-pacmanage-<v>,' \
# fws-pacmanage-<v> (sans build/ ni .git/) # -C <parent> -czf pkgbuilds/fws-pacmanage/fws-pacmanage-<v>.tar.gz \
# fws-pacmanage (sans build/ ni .git/)
# 3. pkgver ci-dessous, puis ./setup-aur.sh && ./build.sh # 3. pkgver ci-dessous, puis ./setup-aur.sh && ./build.sh
#
# ⚠ pkgver SUIT le fichier « version » de la source, pas le nom du dossier de
# livraison. CMake compile cette valeur dans le binaire et UpdateManager la
# compare aux releases du Gitea : un pkgver plus haut que le fichier
# « version » ferait proposer une mise à jour déjà installée, pour toujours.
# ============================================================================ # ============================================================================
pkgname=fws-pacmanage pkgname=fws-pacmanage
pkgver=1.2.1 pkgver=1.4.1
pkgrel=1 pkgrel=1
pkgdesc="PacManager — gestionnaire de paquets graphique de FWS (pacman + Flatpak, Qt6)" pkgdesc="PacManager — gestionnaire de paquets graphique de FWS (pacman + Flatpak + AUR, Qt6)"
arch=('x86_64') arch=('x86_64')
url="https://gitea.nocode-var.tech/FWS/FWS-PacManage" url="https://gitea.nocode-var.tech/FWS/FWS-PacManage"
license=('MIT') license=('MIT')
# qt6-base fournit Widgets ET Network (UpdateManager interroge l'API du Gitea).
# sudo : les opérations privilégiées passent par « sudo -S » avec le mot de # sudo : les opérations privilégiées passent par « sudo -S » avec le mot de
# passe de session (cf. include/pacman-manager.h), pas par polkit. # passe de session (cf. include/pacman-manager.h), pas par polkit.
depends=('qt6-base' 'pacman' 'sudo') depends=('qt6-base' 'pacman' 'sudo')
# Le fournisseur Flatpak est un PLUGIN chargé au démarrage : sans le binaire # Les fournisseurs Flatpak et AUR sont des PLUGINS chargés au démarrage : sans
# flatpak l'application marche, elle n'affiche simplement pas cette source. # leur outil, l'application marche et affiche simplement « Indisponible » pour
optdepends=('flatpak: gestion des paquets Flatpak') # cette source (cf. AurManager::isAvailable, qui cherche yay puis paru).
optdepends=('flatpak: gestion des paquets Flatpak'
'yay: gestion des paquets AUR'
'paru: gestion des paquets AUR (alternative à yay)')
makedepends=('cmake' 'gcc') makedepends=('cmake' 'gcc')
source=("${pkgname}-${pkgver}.tar.gz" source=("${pkgname}-${pkgver}.tar.gz"
"${pkgname}.desktop") "${pkgname}.desktop")
@@ -34,12 +44,15 @@ sha256sums=('SKIP'
build() { build() {
cd "${srcdir}/${pkgname}-${pkgver}" cd "${srcdir}/${pkgname}-${pkgver}"
# Le plugin d'exemple n'a d'intérêt que pour les développeurs de plugins : # Les greffons d'EXEMPLE n'ont d'intérêt que pour les développeurs de
# on ne construit que le fournisseur Flatpak, réellement utile à l'usage. # greffons ; Flatpak et AUR sont de vraies sources de paquets, activées.
cmake -B build \ cmake -B build \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DFWS_BUILD_EXAMPLE_PLUGIN=OFF -DFWS_BUILD_FLATPAK_PLUGIN=ON \
-DFWS_BUILD_AUR_PLUGIN=ON \
-DFWS_BUILD_EXAMPLE_PLUGIN=OFF \
-DFWS_BUILD_EXAMPLE_ADDON=OFF
cmake --build build -j"$(nproc)" cmake --build build -j"$(nproc)"
} }
@@ -55,23 +68,40 @@ package() {
# et les greffons sont trouvés. # et les greffons sont trouvés.
install -Dm755 build/PacManager "${pkgdir}/usr/lib/${pkgname}/PacManager" install -Dm755 build/PacManager "${pkgdir}/usr/lib/${pkgname}/PacManager"
# Le greffon est cherché, pas codé en dur : CMake préfixe les bibliothèques # UpdateManager::currentVersion() lit le fichier « version » posé À CÔTÉ de
# MODULE par « lib » (build/libflatpak-provider.so) mais la règle POST_BUILD # l'exécutable, et retient la PLUS HAUTE des deux valeurs (celle-ci et celle
# en dépose aussi une copie dans build/plugins/. Un chemin figé casserait au # compilée dans le binaire). L'oublier n'est pas grave ici — les deux sont
# moindre changement de l'un ou l'autre — et le nom n'a aucune importance # identiques — mais l'amont l'installe (install(FILES version DESTINATION
# au chargement, PluginManager scanne simplement « *.so ». # bin)) et son absence ferait diverger les deux sources au prochain bump.
local _plugin install -Dm644 version "${pkgdir}/usr/lib/${pkgname}/version"
_plugin="$(find build -maxdepth 2 -name '*flatpak-provider*.so' -print -quit)"
if [ -z "$_plugin" ]; then # Les greffons sont RAMASSÉS, pas listés : la règle POST_BUILD de CMake dépose
echo "ERREUR : greffon Flatpak introuvable dans build/ après compilation" >&2 # chaque bibliothèque MODULE construite dans build/plugins/, et PluginManager
# y scanne simplement « *.so ». Une liste figée ici obligerait à modifier ce
# PKGBUILD à chaque nouveau fournisseur amont (l'AUR est arrivé en 1.4).
local _found=0 _plugin
for _plugin in build/plugins/*.so; do
[ -f "$_plugin" ] || continue
install -Dm755 "$_plugin" \
"${pkgdir}/usr/lib/${pkgname}/plugins/$(basename "$_plugin")"
_found=$((_found + 1))
done
if [ "$_found" -eq 0 ]; then
echo "ERREUR : aucun greffon dans build/plugins/ après compilation" >&2
return 1 return 1
fi fi
install -Dm755 "$_plugin" \ echo "==> $_found greffon(s) installé(s)."
"${pkgdir}/usr/lib/${pkgname}/plugins/flatpak-provider.so"
install -d "${pkgdir}/usr/bin" install -d "${pkgdir}/usr/bin"
ln -s "/usr/lib/${pkgname}/PacManager" "${pkgdir}/usr/bin/${pkgname}" ln -s "/usr/lib/${pkgname}/PacManager" "${pkgdir}/usr/bin/${pkgname}"
# Intégration bureau (l'amont ne fournit ni .desktop ni icône). # Intégration bureau : on garde CELUI DE FWS et pas celui de l'amont.
# L'amont en génère un depuis CMakeLists (org.fws.PacManager.desktop), mais
# il pointe sur ${prefix}/bin/PacManager — un chemin que ce paquet n'a pas —
# et son icône (resources/icons/package.svg) est une icône d'INTERFACE 24 px
# au trait clair CODÉ EN DUR (#c8d3f5) : invisible dans un menu sur thème
# clair. D'où « Icon=system-software-install », un nom standard présent
# partout. À revoir le jour où le projet aura une vraie icône d'application.
install -Dm644 "${srcdir}/${pkgname}.desktop" \ install -Dm644 "${srcdir}/${pkgname}.desktop" \
"${pkgdir}/usr/share/applications/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
Binary file not shown.
Binary file not shown.
+10 -6
View File
@@ -1,11 +1,15 @@
[Desktop Entry] [Desktop Entry]
# Lanceur fourni par FWS : le dépôt amont FWS-PacManage n'en livre aucun # Lanceur fourni par FWS. L'amont en génère bien un depuis la 1.4
# (CMakeLists n'installe que le binaire et les en-têtes). # (org.fws.PacManager.desktop, écrit par CMakeLists), mais il pointe sur
# ${prefix}/bin/PacManager — un chemin que le paquet FWS n'a pas, puisqu'il
# range le binaire dans /usr/lib/fws-pacmanage/ pour garder ses greffons à
# côté. Celui-ci est donc conservé : bon Exec, libellés français, et des
# Keywords pour que rofi/wofi (Super+R) le trouvent.
# #
# Icon : nom d'icône standard, présent dans tous les thèmes — les SVG de # Icon : nom d'icône standard, présent dans tous les thèmes. L'amont installe
# resources/icons/ sont des icônes d'INTERFACE (24 px, trait clair codé en dur # resources/icons/package.svg comme icône d'application, mais c'est une icône
# pour un fond sombre), inutilisables telles quelles dans un menu. À remplacer # d'INTERFACE 24 px au trait clair CODÉ EN DUR (#c8d3f5) : invisible dans un
# le jour où le projet aura une vraie icône d'application. # menu sur thème clair. À revoir le jour où le projet aura une vraie icône.
Type=Application Type=Application
# ATTENTION : « Version » est la version de la SPÉCIFICATION Desktop Entry # ATTENTION : « Version » est la version de la SPÉCIFICATION Desktop Entry
# (1.0 à 1.5), PAS celle de l'application — y mettre 1.2.1 fait échouer # (1.0 à 1.5), PAS celle de l'application — y mettre 1.2.1 fait échouer