summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 57fa9c4d62af6b30b65c814687d5b2720cdf0556 (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
# Maintainer: Sibren Vasse <arch@sibrenvasse.nl>
# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
# Contributor: Philipp Schmitt <philipp@schmitt.co>

pkgname=advanced-ssh-config
_name=assh
pkgver=2.8.0
pkgrel=2
pkgdesc='ssh wrapper using ProxyCommand that adds regex, aliases, gateways, includes, dynamic hostnames to SSH and ssh-config'
arch=('x86_64')
url='https://github.com/moul/assh'
license=('MIT')
makedepends=('go-pie')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/moul/assh/archive/v${pkgver}.tar.gz")
sha256sums=('17656a6ac562707d6e85df44c1ccd04276fb1c08f1ff6a002291f4cb88880069')
_gourl=github.com/moul/advanced-ssh-config

prepare() {
  mkdir -p "gopath/src/github.com/moul/"
  ln -rTsf "${_name}-${pkgver}" "gopath/src/${_gourl}"
}

build() {
  export GOPATH="${srcdir}/gopath"
  cd "gopath/src/${_gourl}"

  go install \
    -gcflags "all=-trimpath=$GOPATH" \
    -asmflags "all=-trimpath=$GOPATH" \
    -ldflags "-extldflags $LDFLAGS" \
    ./...
}

# Tests in vendor/* dependencies are broken with GO 1.12
# check() {
#  export GOPATH="$srcdir"/gopath
#  cd "gopath/src/${_gourl}"
#  go test ./...
# }

package() {
  install -Dm755 gopath/bin/assh "${pkgdir}/usr/bin/assh"
  install -Dm644 "${_name}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: