diff --git a/srcpkgs/mirrorbits/template b/srcpkgs/mirrorbits/template new file mode 100644 index 00000000000..07a40fe2494 --- /dev/null +++ b/srcpkgs/mirrorbits/template @@ -0,0 +1,30 @@ +# Template file for 'mirrorbits' +pkgname=mirrorbits +version=0.4 +revision=1 +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 " +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 +}