diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 78 |
2 files changed, 69 insertions, 22 deletions
@@ -1,16 +1,19 @@ # Generated by mksrcinfo v8 -# Sat Oct 29 00:58:37 UTC 2016 +# Fri Sep 14 01:52:38 UTC 2018 pkgbase = teleconsole pkgdesc = Command line tool to share your UNIX terminal and forward local TCP ports to people you trust. - pkgver = 0.3.1 - pkgrel = 2 + pkgver = 0.4.0 + pkgrel = 1 url = https://github.com/gravitational/teleconsole/ arch = i686 arch = x86_64 license = Apache makedepends = go - source = https://github.com/gravitational/teleconsole/archive/0.3.1.tar.gz - sha1sums = a30e24a6e41af2296ba85b9f5c336824b19adf6d + makedepends = git + source = git+https://github.com/gravitational/teleconsole.git#tag=0.4.0 + source = git+https://github.com/gravitational/teleport.git + sha256sums = SKIP + sha256sums = SKIP pkgname = teleconsole @@ -1,26 +1,70 @@ -# Maintainer: mrxx <mrxx at cyberhome dot at> +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: Emanuele 'Lele aka eldios' Calo' <xeldiosx@gmail.com> +# Contributor: mrxx <mrxx at cyberhome dot at> -pkgname=teleconsole -pkgver=0.3.1 -pkgrel=2 -pkgdesc="Command line tool to share your UNIX terminal and forward local TCP ports to people you trust." +set -u +pkgname="teleconsole" +pkgver='0.4.0' +pkgrel='1' +pkgdesc='Command line tool to share your UNIX terminal and forward local TCP ports to people you trust.' arch=('i686' 'x86_64') -url="https://github.com/gravitational/teleconsole/" +url='https://github.com/gravitational/teleconsole/' license=('Apache') -makedepends=('go') -source=(https://github.com/gravitational/teleconsole/archive/$pkgver.tar.gz) -sha1sums=('a30e24a6e41af2296ba85b9f5c336824b19adf6d') +makedepends=('go' 'git') +# The published .tar.gz sources do not build. The build system only works with git downloads +_srcs=('teleconsole' 'teleport') +source=( + "git+https://github.com/gravitational/teleconsole.git" + "git+https://github.com/gravitational/teleport.git" +) +sha256sums=('SKIP' + 'SKIP') + +if [ "${pkgname%-git}" != "${pkgname}" ]; then + provides=("${pkgname%-git}=${pkgver%%.r*}") + conflicts=("${pkgname%-git}") +pkgver() { + cd "${pkgname%-git}" + git describe --long --tags | sed -e 's/\([^-]*-g\)/r\1/' -e 's/-/./g' +} +else + source[0]+="#tag=${pkgver}" +fi + +_GOLOCAL='local _GOPATH _GOSRC _GOMAIN' +_set_gopath() { + _GOPATH="${srcdir}/go" + _GOSRC="${_GOPATH}/src/github.com/gravitational" + _GOMAIN="${_GOSRC}/teleconsole" +} + +prepare() { + set -u + eval "${_GOLOCAL}"; _set_gopath + mkdir -p "${_GOSRC}" + local _f + for _f in "${_srcs[@]}"; do + ln -rTs "${_f}" "${_GOSRC}/${_f}" + done + set +u +} build() { - cd "$srcdir/$pkgname-$pkgver" - GOPATH=`pwd` go get -d -v - sed -i 's|ProxyHost:|ProxyHostPort:|' src/github.com/gravitational/teleconsole/clt/clt.go - GOPATH=`pwd` go build + set -u + eval "${_GOLOCAL}"; _set_gopath + cd "${_GOMAIN}" + GOPATH="${_GOPATH}" \ + make + set +u } package() { - cd "$srcdir/$pkgname-$pkgver" - install -Dm755 "$pkgname-$pkgver" "$pkgdir/usr/bin/$pkgname" - install -Dm644 README.md ${pkgdir}/usr/share/doc/${pkgname}/README - install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE + set -u + eval "${_GOLOCAL}"; _set_gopath + cd "${_GOMAIN}" + install -Dpm755 "out/${pkgname%-git}" -t "${pkgdir}/usr/bin/" + install -Dpm644 'README.md' "${pkgdir}/usr/share/doc/${pkgname}/README" + install -Dpm644 'LICENSE' -t "${pkgdir}/usr/share/licenses/${pkgname}/" + set +u } +set +u |