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.
57 lines
2.5 KiB
Bash
57 lines
2.5 KiB
Bash
# 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 (<prefix>/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"
|
|
}
|