Files
AUR/backtunnel/PKGBUILD
sysadminmatmoz a856ae7bed Add 'backtunnel/' from commit '91afb22a2b1cbe73ff2ddc25920542495ee76213'
git-subtree-dir: backtunnel
git-subtree-mainline: ee5cd7088c
git-subtree-split: 91afb22a2b
2025-09-14 11:48:50 +02:00

61 lines
2.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
pkgver=1.1.0
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'
'plasma-desktop: Dolphin (KDE/Plasma) service menus')
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
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
}
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"
# Docs
install -Dm644 "docs/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
# License
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}