aboutsummaryrefslogtreecommitdiffstats
path: root/community/go-bindata-assetfs/APKBUILD
blob: 422e981a5e7fba699e12569c6e3a21077c8bc54c (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
# Contributor: Matthias Neugebauer <mtneug@mailbox.org>
# Contributor: omni <omni+alpine@hack.org>
# Maintainer: Matthias Neugebauer <mtneug@mailbox.org>
pkgname=go-bindata-assetfs
pkgver=1.0.1
pkgrel=3
pkgdesc="small utility which generates Go code to serve any file with net/http"
url="https://github.com/elazarl/go-bindata-assetfs"
arch="all"
license="BSD-2-Clause"
depends="go-bindata"
makedepends="go"
options="!check" # no test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/elazarl/go-bindata-assetfs/archive/v$pkgver.tar.gz"

build() {
	export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
	case $CARCH in
		mips*)
			export GOFLAGS="${GOFLAGS/-buildmode=pie}" # Not supported on mips(64)
			;;
	esac
	export GOPATH="$srcdir"
	go build -ldflags="-s -w" -v -o bin/"$pkgname" ./"$pkgname"/main.go
}

package() {
	install -Dm0755 bin/"$pkgname" -t "$pkgdir"/usr/bin
}

sha512sums="fde5cd06393c82a8a1f9da5cc3054c1cc389328b5a232c5595a32755b2d613a83dc7777070152ad31ccbbbfbcf2419ad44bef89f88ceef4c6b7e5df8715309cf  go-bindata-assetfs-1.0.1.tar.gz"