Date: Wednesday, July 21, 2021 @ 08:22:23 Author: grawlinson Revision: 981565
archrelease: copy trunk to community-x86_64 Added: tea/repos/community-x86_64/ tea/repos/community-x86_64/PKGBUILD (from rev 981564, tea/trunk/PKGBUILD) ----------+ PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) Copied: tea/repos/community-x86_64/PKGBUILD (from rev 981564, tea/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2021-07-21 08:22:23 UTC (rev 981565) @@ -0,0 +1,55 @@ +# Maintainer: George Rawlinson <grawlin...@archlinux.org> +# Contributor: John K. Luebs <jkl at johnluebs dot tld> + +pkgname=tea +pkgver=0.7.0 +pkgrel=2 +pkgdesc="A command line tool to interact with Gitea servers" +arch=('x86_64') +url="https://gitea.com/gitea/tea" +license=('MIT') +makedepends=('go') +optdepends=( + 'bash-completion: for shell auto-completion' + 'zsh-completions: for shell auto-completion' +) +replaces=('gitea-tea') +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") +b2sums=('523a220d477777bc3be69960e5e9ae038620d45fa40d15979a0e5f213f3a00d16f7d35d8c9d37138b99b0014d094bfb10feb7416b536ac6391eabc83ff520177') + +prepare() { + cd "$pkgname" + mkdir build + + # fix zsh completion + sed -i "s/\$PROG/tea/" contrib/autocomplete.zsh +} +build() { + cd "$pkgname" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + local TAGS="" + go build -v \ + -trimpath \ + -buildmode=pie \ + -mod=vendor \ + -modcacherw \ + -ldflags "-linkmode external -extldflags $LDFLAGS -X "main.Version=${pkgver}" -X "main.Tags=${TAGS}"" \ + -o build . +} + +package() { + cd "$pkgname" + + # binary + install -vDm755 -t "$pkgdir/usr/bin" build/tea + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE + + # completions + install -vDm644 contrib/autocomplete.sh "$pkgdir/usr/share/bash-completion/completions/$pkgname" + install -vDm644 contrib/autocomplete.zsh "$pkgdir/usr/share/zsh/site-functions/_tea" +}