From ba112f9ab8d093cfc2a2211500d5b9e6dfc2973d Mon Sep 17 00:00:00 2001 From: BlackAngelTVdev Date: Fri, 30 Oct 2026 10:06:42 +0100 Subject: [PATCH] feat(pkgbuilds): package PacManager 1.6.0 for the FWS image PacManager ships only sources from its Gitea releases, so the image needs a recipe to carry the compiled app. It is installed under a dedicated /opt/fws-pacmanage prefix because its self-update rewrites the directory of the running binary: a bare bin/ install would drop a `version` marker and a `plugins/` folder straight into /usr/bin. The upstream CMakeLists also declares its plugin install rules above the FWS_BUILD_*_PLUGIN options, so the Flatpak and AUR providers are installed by hand into that same directory. --- pkgbuilds/fws-pacmanage/PKGBUILD | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pkgbuilds/fws-pacmanage/PKGBUILD diff --git a/pkgbuilds/fws-pacmanage/PKGBUILD b/pkgbuilds/fws-pacmanage/PKGBUILD new file mode 100644 index 0000000..5a57c24 --- /dev/null +++ b/pkgbuilds/fws-pacmanage/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: FWS +pkgname=fws-pacmanage +pkgver=1.6.0 +pkgrel=1 +pkgdesc="PacManager — gestionnaire de paquets graphique FWS (Qt6, sur pacman)" +arch=('x86_64') +url="https://gitea.nocode-var.tech/FWS/FWS-PacManage" +# FWS owns PacManager; the upstream LICENSE is source-available, not free. +license=('custom') +depends=('qt6-base' 'zlib' 'pacman') +makedepends=('cmake' 'gcc') +source=("${pkgname}-${pkgver}.tar.gz::https://gitea.nocode-var.tech/FWS/FWS-PacManage/archive/V${pkgver}.tar.gz") +sha256sums=('e355a9a7b01b4842fd334e52aec7b415bed5a82d48dae18c7a8c4e24371bef20') + +# The whole app lives under /opt/fws-pacmanage because it updates itself: the +# self-update replaces the binary, the `version` marker and the plugins in the +# directory of the running executable. A real prefix keeps those files out of +# /usr/bin (a bare `bin` install would drop /usr/bin/version and /usr/bin/plugins). +build() { + cmake -S "${srcdir}/${pkgname}" -B "${srcdir}/build" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/opt/fws-pacmanage \ + -DFWS_BUILD_FLATPAK_PLUGIN=ON \ + -DFWS_BUILD_AUR_PLUGIN=ON + cmake --build "${srcdir}/build" -j"$(nproc)" +} + +package() { + DESTDIR="${pkgdir}" cmake --install "${srcdir}/build" + + # The upstream CMakeLists declares its plugin install() rules ABOVE the + # FWS_BUILD_*_PLUGIN option() calls, so both are undefined there and + # `cmake --install` never ships the providers. Install the built modules by + # hand into the first search path, which is also where the self-update + # refreshes them (/bin/plugins). + install -d "${pkgdir}/opt/fws-pacmanage/bin/plugins" + install -m755 "${srcdir}/build/plugins/"*.so \ + "${pkgdir}/opt/fws-pacmanage/bin/plugins/" + + # Entry point outside the self-updating tree: launchers and shells find it on + # PATH while the update keeps rewriting /opt/fws-pacmanage/bin. + install -d "${pkgdir}/usr/bin" + ln -s /opt/fws-pacmanage/bin/PacManager "${pkgdir}/usr/bin/PacManager" + + # Launchers only read /usr/share; the prefix copies stay in /opt. + install -Dm644 "${pkgdir}/opt/fws-pacmanage/share/applications/org.fws.PacManager.desktop" \ + "${pkgdir}/usr/share/applications/org.fws.PacManager.desktop" + install -Dm644 "${pkgdir}/opt/fws-pacmanage/share/icons/hicolor/scalable/apps/org.fws.PacManager.svg" \ + "${pkgdir}/usr/share/icons/hicolor/scalable/apps/org.fws.PacManager.svg" + + # Restrictive upstream license (FWS, all rights reserved): the notice has to + # travel with the redistributed binary. + + install -Dm644 "${srcdir}/${pkgname}/LICENSE" \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}