blob: e446eed5f4f4e3500b153064137c9688404af00e (
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
|
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Jack Roehr <jack@seatgull.com>
# Maintainer: tee <teeaur at duck dot com>
pkgname=ticker
pkgver=4.7.1
pkgrel=1
pkgdesc='Terminal stock ticker with live updates and position tracking'
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/achannarasappa/ticker"
license=('GPL3')
depends=('glibc')
makedepends=('go')
source_x86_64=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums_x86_64=('e5adf107c1a38e9e5235a654eeede491c9dc01e25460270d092e937de3a16d68')
prepare () {
cd "$pkgname-$pkgver"
mkdir -p build/
go mod download
}
build () {
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
cd "$pkgname-$pkgver"
go build -o build -ldflags "-linkmode=external -X '${url#https://}/cmd.Version=v$pkgver'"
}
check () {
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
cd "$pkgname-$pkgver"
go test ./...
}
package () {
cd "$pkgname-$pkgver"
install -Dv "build/$pkgname" -t "$pkgdir/usr/bin/"
install -Dvm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dvm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
|