void-packages/srcpkgs/darch/template
2019-01-30 10:41:57 -02:00

42 lines
997 B
Bash

# Template file for 'darch'
pkgname=darch
version=0.27.0
revision=1
only_for_archs="x86_64 x86_64-musl ppc64le ppc64le-musl"
build_style=go
go_import_path=github.com/godarch/darch
conf_files="/etc/darch/hooks/ssh/hook /etc/darch/hooks/hostname/hook /etc/darch/hooks/fstab/hook"
make_dirs="/var/lib/darch 0755 root root"
hostmakedepends="git go"
depends="containerd"
short_desc="Tool for building/booting stateless and immutable images, bare metal"
maintainer="Paul Knopf <pauldotknopf@gmail.com>"
license="MIT"
homepage="https://godarch.com/"
do_fetch() {
mkdir -p "$(dirname ${GOSRCPATH})"
git clone --branch "v${version}" \
git://github.com/godarch/darch \
${GOSRCPATH}
}
do_configure() {
export GOBIN=${GOPATH}/bin
export PATH=$PATH:$GOBIN
go get github.com/LK4D4/vndr
cd ${GOSRCPATH}
vndr
}
do_build() {
cd ${GOSRCPATH}
make build TRAVIS_TAG="v${version}" GO_BUILD_FLAGS="-buildmode=pie"
}
do_install() {
cd ${GOSRCPATH}
make install DESTDIR=${DESTDIR}
vlicense LICENSE
}