summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9e92ea8c7853bfa094928a73d02abd77069e442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Pascal <deine-email@example.com>

pkgname=pulsegate-git
_pkgname=PulseGate
pkgver=0.1.0.r8.ge9a6c57
pkgrel=1
pkgdesc="Neon SSH Control Center TUI for managing SSH servers and quick commands"
arch=('x86_64')
url="https://git.pepe44.dev/Pepe44DEV/PulseGate"
license=('MIT')
depends=(
  'glibc'
  'openssh'
  'sshpass'
  'gnome-keyring'
  'libsecret'
)
makedepends=(
  'git'
  'go'
)
optdepends=(
  'seahorse: manage stored keyring passwords'
  'kitty: recommended terminal'
)
provides=('pulsegate')
conflicts=('pulsegate')
source=("$_pkgname::git+https://git.pepe44.dev/Pepe44DEV/PulseGate")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname" || exit 1

  printf "0.1.0.r%s.g%s" \
    "$(git rev-list --count HEAD)" \
    "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$_pkgname" || exit 1

  export CGO_ENABLED=0
  export GOPATH="$srcdir/gopath"

  go build \
    -trimpath \
    -mod=readonly \
    -ldflags="-X main.version=${pkgver}" \
    -o pulsegate .
}

package() {
  cd "$srcdir/$_pkgname" || exit 1

  install -Dm755 pulsegate "$pkgdir/usr/bin/pulsegate"

  if [ -f README.md ]; then
    install -Dm644 README.md "$pkgdir/usr/share/doc/pulsegate/README.md"
  fi

  if [ -f config.example.yaml ]; then
    install -Dm644 config.example.yaml "$pkgdir/usr/share/doc/pulsegate/config.example.yaml"
  fi

  if [ -f pulsegate_screenshot.png ]; then
    install -Dm644 pulsegate_screenshot.png "$pkgdir/usr/share/doc/pulsegate/pulsegate_screenshot.png"
  fi
}