blob: 3163f9f7e1764e832185f929992cb2673923ba65 (
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
|
pkgname=got
pkgver=0.7.0
pkgrel=1
pkgdesc='Simple golang package and CLI tool to download large files faster than cURL and Wget!'
arch=('x86_64' 'arm64')
url="https://github.com/melbahja/$pkgname"
license=('MIT')
makedepends=('go')
source=(${pkgname}-${pkgver}.tar.gz::"$url/archive/v$pkgver.tar.gz")
sha256sums=('b955baa729f7f7c0ddda9fe2a777e3ecfb25443839b894d4723262e382eadcc8')
prepare(){
cd "$pkgname-$pkgver"
mkdir -p build/
}
build() {
cd "$pkgname-$pkgver/cmd/$pkgname"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-X main.version=$pkgver" \
-o got
}
check() {
cd "$pkgname-$pkgver"
go test -v -race ./...
}
package() {
cd "$pkgname-$pkgver/"
install -Dm755 "cmd/$pkgname/$pkgname" "$pkgdir"/usr/bin/$pkgname
install -Dm755 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
|