# Maintainer: Hoang Nguyen pkgname=mabel pkgver=0.1.4 pkgrel=1 pkgdesc="Fancy BitTorrent client for the terminal written in Go" url="https://github.com/smmr-software/mabel" arch="all" license="GPL-3.0-or-later" makedepends="go" source="$pkgname-$pkgver.tar.gz::https://github.com/smmr-software/mabel/archive/refs/tags/v$pkgver.tar.gz anacrolix-mmsg-support-riscv64.patch.noauto " export GOMODCACHE="$srcdir/go" export GOFLAGS="$GOFLAGS -modcacherw" prepare() { default_prepare case $CARCH in riscv64) go mod download chmod -R +w "$GOMODCACHE" patch -p1 \ -d "$GOMODCACHE/github.com/anacrolix/mmsg@v1.0.0" \ -i "$srcdir"/anacrolix-mmsg-support-riscv64.patch.noauto ;; esac } build() { local _ldflags=" -X main.version=v$pkgver -X main.commit=AlpineLinux -X main.date=$(date +%FT%T%Z) " go build -v -o bin/$pkgname -ldflags "$_ldflags" } check() { go test ./... } package() { install -Dm755 bin/$pkgname -t "$pkgdir"/usr/bin } sha512sums=" eb107a57476281a37702b5fdecc5a63d96d6fb82a78c2f8438b1da72c9f6eb6cd25ea36ee58cb75f6285064fcef4fca72d21a9e965bc545d8144fb40ef86f9ac mabel-0.1.4.tar.gz b131472e22217bf25af5eb244f753cf9b2e97844c62bbe8fbadee61b34b3d7f21d6a272233db29faf2e7e6d9f6e1148aced4c7aa35f9bc7998395e7b5e174b46 anacrolix-mmsg-support-riscv64.patch.noauto "