feat(installer): install PacManager on the target system only
PacManager (FWS-PacManage 1.2.1) is packaged like fws-dnd: a local PKGBUILD with the sources vendored in the repository, because the upstream Gitea is private and makepkg cannot fetch from it during the build. It is deliberately absent from packages.x86_64. On a live system one is about to replace, a package manager serves no purpose, and it would drag qt6-base into the squashfs for nothing. build.sh drops the built package into the image instead, and the kickstart %post installs it into the target, then deletes the file. Two conditions there: only when a desktop was chosen (it is a GUI application, nothing could launch it on a command-line install), and never blocking -- "pacman -U" resolves qt6-base over the network, and no PacManager is not a failed installation. The binary goes to /usr/lib/fws-pacmanage rather than /usr/bin: PluginManager looks for its plugins in applicationDirPath()/plugins, so /usr/bin would mean a /usr/bin/plugins directory polluting a PATH entry. Binary and plugins stay together in a private directory and /usr/bin/fws-pacmanage is a symlink -- Qt resolves /proc/self/exe, so the plugins are still found. Upstream ships no .desktop file, so one is provided here. build.sh also gains a guard: it now checks, before any lengthy step, that every package only local-repo can provide is actually built. Until now a missing one surfaced as a bare "target not found" from pacman, after the mirror refresh, the full upgrade and the whole mkarchiso setup -- several minutes for an error detectable in one second. Signed-off-by: nocode <suzuku295@gmail.com>
This commit is contained in:
1 parent
c7607b3f37
commit
213ff2d47d
6 files changed
+183
-1
No files matched your search
@@ -0,0 +1,80 @@
|
||||
# Maintainer: FWS
|
||||
# ============================================================================
|
||||
# fws-pacmanage — PacManager, le gestionnaire de paquets graphique de FWS.
|
||||
#
|
||||
# Source VENDUE dans le dépôt (même choix que fws-dnd) : le dépôt amont
|
||||
# FWS-PacManage vit sur un Gitea PRIVÉ, makepkg ne peut donc pas la
|
||||
# télécharger pendant le build. Le tarball est régénéré depuis les sources à
|
||||
# chaque montée de version (cf. « Mise à jour » plus bas).
|
||||
#
|
||||
# MISE À JOUR :
|
||||
# 1. bump du fichier « version » côté FWS-PacManage
|
||||
# 2. tar -C <parent> -czf pkgbuilds/fws-pacmanage/fws-pacmanage-<v>.tar.gz \
|
||||
# fws-pacmanage-<v> (sans build/ ni .git/)
|
||||
# 3. pkgver ci-dessous, puis ./setup-aur.sh && ./build.sh
|
||||
# ============================================================================
|
||||
pkgname=fws-pacmanage
|
||||
pkgver=1.2.1
|
||||
pkgrel=1
|
||||
pkgdesc="PacManager — gestionnaire de paquets graphique de FWS (pacman + Flatpak, Qt6)"
|
||||
arch=('x86_64')
|
||||
url="https://gitea.nocode-var.tech/FWS/FWS-PacManage"
|
||||
license=('MIT')
|
||||
# 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.
|
||||
depends=('qt6-base' 'pacman' 'sudo')
|
||||
# Le fournisseur Flatpak est un PLUGIN chargé au démarrage : sans le binaire
|
||||
# flatpak l'application marche, elle n'affiche simplement pas cette source.
|
||||
optdepends=('flatpak: gestion des paquets Flatpak')
|
||||
makedepends=('cmake' 'gcc')
|
||||
source=("${pkgname}-${pkgver}.tar.gz"
|
||||
"${pkgname}.desktop")
|
||||
sha256sums=('SKIP'
|
||||
'SKIP')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
# Le plugin d'exemple n'a d'intérêt que pour les développeurs de plugins :
|
||||
# on ne construit que le fournisseur Flatpak, réellement utile à l'usage.
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DFWS_BUILD_EXAMPLE_PLUGIN=OFF
|
||||
cmake --build build -j"$(nproc)"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
# POURQUOI /usr/lib et pas /usr/bin : PluginManager cherche ses greffons dans
|
||||
# « applicationDirPath()/plugins » (src/plugin-manager.cpp). Installer le
|
||||
# binaire dans /usr/bin imposerait donc un dossier /usr/bin/plugins, ce qui
|
||||
# pollue un répertoire du PATH. On garde binaire + greffons ensemble dans un
|
||||
# dossier privé, et on expose une seule commande par lien symbolique : Qt
|
||||
# résout /proc/self/exe, applicationDirPath() renvoie donc bien /usr/lib/…
|
||||
# et les greffons sont trouvés.
|
||||
install -Dm755 build/PacManager "${pkgdir}/usr/lib/${pkgname}/PacManager"
|
||||
|
||||
# Le greffon est cherché, pas codé en dur : CMake préfixe les bibliothèques
|
||||
# MODULE par « lib » (build/libflatpak-provider.so) mais la règle POST_BUILD
|
||||
# en dépose aussi une copie dans build/plugins/. Un chemin figé casserait au
|
||||
# moindre changement de l'un ou l'autre — et le nom n'a aucune importance
|
||||
# au chargement, PluginManager scanne simplement « *.so ».
|
||||
local _plugin
|
||||
_plugin="$(find build -maxdepth 2 -name '*flatpak-provider*.so' -print -quit)"
|
||||
if [ -z "$_plugin" ]; then
|
||||
echo "ERREUR : greffon Flatpak introuvable dans build/ après compilation" >&2
|
||||
return 1
|
||||
fi
|
||||
install -Dm755 "$_plugin" \
|
||||
"${pkgdir}/usr/lib/${pkgname}/plugins/flatpak-provider.so"
|
||||
install -d "${pkgdir}/usr/bin"
|
||||
ln -s "/usr/lib/${pkgname}/PacManager" "${pkgdir}/usr/bin/${pkgname}"
|
||||
|
||||
# Intégration bureau (l'amont ne fournit ni .desktop ni icône).
|
||||
install -Dm644 "${srcdir}/${pkgname}.desktop" \
|
||||
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
||||
|
||||
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
[Desktop Entry]
|
||||
# Lanceur fourni par FWS : le dépôt amont FWS-PacManage n'en livre aucun
|
||||
# (CMakeLists n'installe que le binaire et les en-têtes).
|
||||
#
|
||||
# Icon : nom d'icône standard, présent dans tous les thèmes — les SVG de
|
||||
# resources/icons/ sont des icônes d'INTERFACE (24 px, trait clair codé en dur
|
||||
# pour un fond sombre), inutilisables telles quelles dans un menu. À remplacer
|
||||
# le jour où le projet aura une vraie icône d'application.
|
||||
Type=Application
|
||||
# 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
|
||||
# desktop-file-validate : « value "1.2.1" is not a known version ».
|
||||
Version=1.0
|
||||
Name=Gestionnaire de paquets
|
||||
Name[en]=Package Manager
|
||||
GenericName=Gestionnaire de paquets
|
||||
GenericName[en]=Package Manager
|
||||
Comment=Rechercher, installer et mettre à jour les logiciels
|
||||
Comment[en]=Search, install and update software
|
||||
Exec=fws-pacmanage
|
||||
Icon=system-software-install
|
||||
Terminal=false
|
||||
Categories=System;PackageManager;
|
||||
Keywords=paquet;paquets;logiciel;pacman;flatpak;installer;mise à jour;package;software;update;
|
||||
StartupNotify=true
|
||||
Reference in new issue
Block a user