# Maintainer: maxtheweb pkgname=xapi pkgver=0.1.0 pkgrel=1 pkgdesc="The quota-intelligent X API CLI tool - smart quota management for developers" arch=('x86_64' 'aarch64') url="https://git.maxtheweb.com/maxtheweb/xapi-cli" license=('MIT') makedepends=('go') depends=() optdepends=('nvim: recommended text editor for configuration' 'vim: alternative text editor' 'nano: lightweight text editor') source=("$pkgname-cli-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('SKIP') build() { cd "$pkgname-cli-$pkgver" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" go build -o xapi . } package() { cd "$pkgname-cli-$pkgver" install -Dm755 xapi "$pkgdir"/usr/bin/xapi install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md }