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" }