Update BackTunnel PKGBUILD: enhance dependencies, add GUI wrapper, and improve service menu handling

This commit is contained in:
2025-09-14 18:08:22 +02:00
parent 00d7c10e72
commit dfa39dcaa9

View File

@@ -3,32 +3,31 @@
# Repo: https://labs.pmisuite.com/PMISuite/BackTunnel # Repo: https://labs.pmisuite.com/PMISuite/BackTunnel
pkgname=backtunnel pkgname=backtunnel
pkgver=0.0.0.r6.g5dab6c0 pkgver=0.0.0
pkgrel=1 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') arch=('any')
url="https://labs.pmisuite.com/PMISuite/BackTunnel" url="https://labs.pmisuite.com/PMISuite/BackTunnel"
license=('GPL3') license=('GPL3')
depends=('bash' 'openssh' 'sshfs' 'kdialog' 'konsole') depends=('bash' 'openssh' 'sshfs' 'kdialog' 'konsole' 'coreutils')
optdepends=('bash-completion: tab completion for backtunnel-share/access' optdepends=('qrencode: show QR code for invite'
'bash-completion: tab completion for backtunnel-share/access'
'plasma-desktop: Dolphin (KDE/Plasma) service menus') 'plasma-desktop: Dolphin (KDE/Plasma) service menus')
makedepends=('git') makedepends=('git')
source=("git+https://labs.pmisuite.com/PMISuite/BackTunnel.git")
sha256sums=('SKIP')
install=${pkgname}.install install=${pkgname}.install
source=("git+https://labs.pmisuite.com/PMISuite/BackTunnel.git")
md5sums=('SKIP')
pkgver() { pkgver() {
cd "${srcdir}/BackTunnel" cd "${srcdir}/BackTunnel"
if git describe --tags --abbrev=0 >/dev/null 2>&1; then # generate a pkgver like: 0.0.0.r<N>.g<commit>
local tag printf "0.0.0.r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
tag=$(git describe --tags --abbrev=0) }
local desc
desc=$(git describe --tags --long --match "${tag}" 2>/dev/null || git describe --tags --long) build() {
# v1.2.3-4-gabcd123 -> 1.2.3.r4.gabcd123 cd "${srcdir}/BackTunnel"
echo "${desc}" | sed -E 's/^v//; s/-([0-9]+)-g/.r\1.g/; s/-/./g' # nothing to build
else :
printf "0.0.0.r%s.g%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
fi
} }
package() { package() {
@@ -37,6 +36,8 @@ package() {
# Binaries # Binaries
install -Dm755 "scripts/backtunnel-share" "${pkgdir}/usr/bin/backtunnel-share" install -Dm755 "scripts/backtunnel-share" "${pkgdir}/usr/bin/backtunnel-share"
install -Dm755 "scripts/backtunnel-access" "${pkgdir}/usr/bin/backtunnel-access" 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 # Man page
install -Dm644 "man/backtunnel.1" "${pkgdir}/usr/share/man/man1/backtunnel.1" 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-share"
install -Dm644 "completions/backtunnel.bash" "${pkgdir}/usr/share/bash-completion/completions/backtunnel-access" install -Dm644 "completions/backtunnel.bash" "${pkgdir}/usr/share/bash-completion/completions/backtunnel-access"
# Desktop launcher # Desktop launcher (if present)
if [[ -f "desktop/backtunnel.desktop" ]]; then
install -Dm644 "desktop/backtunnel.desktop" "${pkgdir}/usr/share/applications/backtunnel.desktop" install -Dm644 "desktop/backtunnel.desktop" "${pkgdir}/usr/share/applications/backtunnel.desktop"
fi
# Dolphin service menus (Plasma 6 and Plasma 5) # Dolphin service menus
install -Dm644 "servicemenus/backtunnel_share.desktop" "${pkgdir}/usr/share/kio/servicemenus/backtunnel_share.desktop" 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_access.desktop" "${pkgdir}/usr/share/kio/servicemenus/backtunnel_access.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_share.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_share.desktop"
install -Dm644 "servicemenus/backtunnel_access.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_access.desktop" install -Dm644 "servicemenus/backtunnel_access.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_access.desktop"
} }