blob: 3437e501c6c11b06c64c4ea57a87ef87455e50bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
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
"
|