2025-09-14 11:42:27 +02:00
|
|
|
|
# Maintainer: Matjaž Mozetič <matjaz@matmoz.si>
|
|
|
|
|
|
# Project: BackTunnel – Reverse SSH folder sharing toolkit with Dolphin (KDE) integration
|
|
|
|
|
|
# Repo: https://labs.pmisuite.com/PMISuite/BackTunnel
|
|
|
|
|
|
|
|
|
|
|
|
pkgname=backtunnel
|
2025-09-14 16:51:30 +02:00
|
|
|
|
pkgver=0.0.0.r6.g5dab6c0
|
2025-09-14 11:42:27 +02:00
|
|
|
|
pkgrel=1
|
|
|
|
|
|
pkgdesc="BackTunnel – Reverse SSH folder sharing toolkit with Dolphin (KDE) service menus"
|
|
|
|
|
|
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'
|
2025-09-14 16:51:30 +02:00
|
|
|
|
'plasma-desktop: Dolphin (KDE/Plasma) service menus')
|
2025-09-14 11:42:27 +02:00
|
|
|
|
makedepends=('git')
|
|
|
|
|
|
source=("git+https://labs.pmisuite.com/PMISuite/BackTunnel.git")
|
|
|
|
|
|
sha256sums=('SKIP')
|
|
|
|
|
|
install=${pkgname}.install
|
|
|
|
|
|
|
|
|
|
|
|
pkgver() {
|
|
|
|
|
|
cd "${srcdir}/BackTunnel"
|
|
|
|
|
|
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
|
2025-09-14 16:51:30 +02:00
|
|
|
|
local tag
|
|
|
|
|
|
tag=$(git describe --tags --abbrev=0)
|
|
|
|
|
|
local desc
|
|
|
|
|
|
desc=$(git describe --tags --long --match "${tag}" 2>/dev/null || git describe --tags --long)
|
2025-09-14 11:42:27 +02:00
|
|
|
|
# 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
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
|
|
# Man page
|
|
|
|
|
|
install -Dm644 "man/backtunnel.1" "${pkgdir}/usr/share/man/man1/backtunnel.1"
|
|
|
|
|
|
|
|
|
|
|
|
# Bash completion (install for both command names)
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
|
|
# Dolphin service menus (Plasma 6 and Plasma 5)
|
|
|
|
|
|
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"
|
|
|
|
|
|
install -Dm644 "servicemenus/backtunnel_access.desktop" "${pkgdir}/usr/share/kservices5/ServiceMenus/backtunnel_access.desktop"
|
|
|
|
|
|
}
|