blob: 2f23480dcd42097352e144ad3e4f7be331de881a (
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
|
pkgname=uni
pkgver=2.6.0
pkgrel=1
pkgdesc='Query the Unicode database from the commandline, with good support for emojis'
arch=('x86_64')
repo="github.com/arp242/$pkgname"
url="https://$repo"
license=('MIT')
makedepends=('go')
source=("$url/archive/v$pkgver.tar.gz")
sha256sums=('dc9b5081279b03b8ffcf1120d3a12635acade73d43abf6a511e3453aa0180e1f')
#prepare() {
# go mod vendor # to not download anything in build()
#}
build() {
export CGO_LDFLAGS="$LDFLAGS"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" # add "-mod=vendor" if using `go mod vendor` in prepare()
cd "$pkgname-$pkgver"
go build -o "$pkgname" .
}
check() {
cd "$pkgname-$pkgver"
go test ./...
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "$pkgname" -t "$pkgdir/usr/bin"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|