# Template file for 'mirrorbits'
pkgname=mirrorbits
version=0.4
revision=2
build_style=go
go_import_path="github.com/etix/mirrorbits"
# from Makefile
# we use tarball, so no
go_ldflags="-X ${go_import_path}/core.VERSION=${VERSION}"
hostmakedepends="govendor git pkg-config"
makedepends="geoip-devel"
depends="geoip-data redis"
short_desc="Geographical download redirector"
maintainer="lemmi <lemmi@nerd2nerd.org>"
license="MIT"
homepage="https://github.com/etix/mirrorbits"
distfiles="https://github.com/etix/mirrorbits/archive/v0.4.tar.gz"
checksum=4da8f19aae0e63befe53370c9922cb91a656459e7607f8f1b42be07c789e37a0

pre_build() {
	cd "${GOPATH}/src/${go_import_path}"
	govendor sync
}

post_install() {
	vlicense LICENSE.txt
	vmkdir usr/share/mirrorbits/templates
	vcopy templates usr/share/mirrorbits/
	vsconf mirrorbits.conf
}
