Skip to content
Snippets Groups Projects
Commit bf56263e authored by George Rawlinson's avatar George Rawlinson :coffee:
Browse files

addpkg: 0.7.0-2

parent 58cd126e
No related branches found
Tags 0.7.0-2
No related merge requests found
PKGBUILD 0 → 100644
# Maintainer: George Rawlinson <grawlinson@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"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment