archrelease: copy trunk to community-any
[arch-community.git] / upterm / trunk / PKGBUILD
blob9f1c252f2e0d2b852a42457d3f1098155d499b48
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Sýlvan Heuser <sylvan.heuser@gmx.net>
3 pkgname=upterm
4 pkgver=0.10.0
5 pkgrel=1
6 pkgdesc='Secure Terminal Sharing, an alternative to tmate'
7 arch=('x86_64')
8 url="https://github.com/owenthereal/upterm"
9 license=('Apache')
10 depends=('glibc')
11 makedepends=('go')
12 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/owenthereal/upterm/archive/v${pkgver}.tar.gz")
13 sha256sums=('05409ae3a124d611221f64e87016d67cfd2d3a125fcfec95abb9a123acd9d1a2')
15 prepare() {
16   cd "${pkgname}-${pkgver}"
18   mkdir -p build/
21 build() {
22   cd "${pkgname}-${pkgver}"
23   export CGO_CPPFLAGS="${CPPFLAGS}"
24   export CGO_CFLAGS="${CFLAGS}"
25   export CGO_CXXFLAGS="${CXXFLAGS}"
26   export CGO_LDFLAGS="${LDFLAGS}"
27   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
28   go build -o build ./cmd/...
29   build/gendoc
32 check() {
33   cd "${pkgname}-${pkgver}"
34   go test ./...
37 package() {
38   cd "${pkgname}-${pkgver}"
39   install -Dm755 "build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
40   install -Dm755 "build/${pkgname}d" "${pkgdir}/usr/bin/${pkgname}d"
41   install -dm755 "${pkgdir}/usr/share/man"
42   cp -av etc/man/* "${pkgdir}/usr/share/man/"
43   install -Dm644 "etc/completion/upterm.bash_completion.sh" "${pkgdir}/usr/share/bash-completion/completions/upterm"
44   install -Dm644 "etc/completion/upterm.zsh_completion" "${pkgdir}/usr/share/zsh/site-functions/_upterm"
45   install -Dm644 systemd/uptermd.service "${pkgdir}/usr/lib/systemd/system/uptermd.service"
48 # vim:set ts=2 sw=2 et: