From dfa39dcaa916d2927ce8c14ff246e8261c1e88e6 Mon Sep 17 00:00:00 2001 From: sysadminmatmoz Date: Sun, 14 Sep 2025 18:08:22 +0200 Subject: [PATCH] Update BackTunnel PKGBUILD: enhance dependencies, add GUI wrapper, and improve service menu handling --- backtunnel/PKGBUILD | 52 ++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/backtunnel/PKGBUILD b/backtunnel/PKGBUILD index 84f807d..10fd83f 100644 --- a/backtunnel/PKGBUILD +++ b/backtunnel/PKGBUILD @@ -3,40 +3,41 @@ # Repo: https://labs.pmisuite.com/PMISuite/BackTunnel pkgname=backtunnel -pkgver=0.0.0.r6.g5dab6c0 +pkgver=0.0.0 pkgrel=1 -pkgdesc="BackTunnel – Reverse SSH folder sharing toolkit with Dolphin (KDE) service menus" +pkgdesc="BackTunnel – Reverse SSH folder sharing toolkit with Dolphin (KDE) service menus (with GUI wrapper)" arch=('any') url="https://labs.pmisuite.com/PMISuite/BackTunnel" license=('GPL3') -depends=('bash' 'openssh' 'sshfs' 'kdialog' 'konsole') -optdepends=('bash-completion: tab completion for backtunnel-share/access' - 'plasma-desktop: Dolphin (KDE/Plasma) service menus') +depends=('bash' 'openssh' 'sshfs' 'kdialog' 'konsole' 'coreutils') +optdepends=('qrencode: show QR code for invite' + 'bash-completion: tab completion for backtunnel-share/access' + 'plasma-desktop: Dolphin (KDE/Plasma) service menus') makedepends=('git') -source=("git+https://labs.pmisuite.com/PMISuite/BackTunnel.git") -sha256sums=('SKIP') install=${pkgname}.install +source=("git+https://labs.pmisuite.com/PMISuite/BackTunnel.git") +md5sums=('SKIP') pkgver() { cd "${srcdir}/BackTunnel" - if git describe --tags --abbrev=0 >/dev/null 2>&1; then - local tag - tag=$(git describe --tags --abbrev=0) - local desc - desc=$(git describe --tags --long --match "${tag}" 2>/dev/null || git describe --tags --long) - # v1.2.3-4-gabcd123 -> 1.2.3.r4.gabcd123 - echo "${desc}" | sed -E 's/^v//; s/-([0-9]+)-g/.r\1.g/; s/-/./g' - else - printf "0.0.0.r%s.g%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - fi + # generate a pkgver like: 0.0.0.r.g + printf "0.0.0.r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "${srcdir}/BackTunnel" + # nothing to build + : } package() { cd "${srcdir}/BackTunnel" # Binaries - install -Dm755 "scripts/backtunnel-share" "${pkgdir}/usr/bin/backtunnel-share" - install -Dm755 "scripts/backtunnel-access" "${pkgdir}/usr/bin/backtunnel-access" + install -Dm755 "scripts/backtunnel-share" "${pkgdir}/usr/bin/backtunnel-share" + install -Dm755 "scripts/backtunnel-access" "${pkgdir}/usr/bin/backtunnel-access" + # NEW: GUI wrapper for Dolphin service menu + install -Dm755 "scripts/backtunnel-share-gui" "${pkgdir}/usr/bin/backtunnel-share-gui" # Man page install -Dm644 "man/backtunnel.1" "${pkgdir}/usr/share/man/man1/backtunnel.1" @@ -45,12 +46,15 @@ package() { install -Dm644 "completions/backtunnel.bash" "${pkgdir}/usr/share/bash-completion/completions/backtunnel-share" install -Dm644 "completions/backtunnel.bash" "${pkgdir}/usr/share/bash-completion/completions/backtunnel-access" - # Desktop launcher - install -Dm644 "desktop/backtunnel.desktop" "${pkgdir}/usr/share/applications/backtunnel.desktop" + # Desktop launcher (if present) + if [[ -f "desktop/backtunnel.desktop" ]]; then + install -Dm644 "desktop/backtunnel.desktop" "${pkgdir}/usr/share/applications/backtunnel.desktop" + fi - # Dolphin service menus (Plasma 6 and Plasma 5) - install -Dm644 "servicemenus/backtunnel_share.desktop" "${pkgdir}/usr/share/kio/servicemenus/backtunnel_share.desktop" + # Dolphin service menus + install -Dm644 "servicemenus/backtunnel_share.desktop" "${pkgdir}/usr/share/kio/servicemenus/backtunnel_share.desktop" install -Dm644 "servicemenus/backtunnel_access.desktop" "${pkgdir}/usr/share/kio/servicemenus/backtunnel_access.desktop" - install -Dm644 "servicemenus/backtunnel_share.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_share.desktop" + # Plasma 5 legacy path (keep for users on older Plasma) + install -Dm644 "servicemenus/backtunnel_share.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_share.desktop" install -Dm644 "servicemenus/backtunnel_access.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_access.desktop" }