From 5ed4ba0a7e2d7a30f7edef949aa6c8b6e002b052 Mon Sep 17 00:00:00 2001 From: Paul Knopf Date: Mon, 12 Feb 2018 01:49:51 +0000 Subject: [PATCH] New package: darch-0.18.3 --- srcpkgs/darch/template | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 srcpkgs/darch/template diff --git a/srcpkgs/darch/template b/srcpkgs/darch/template new file mode 100644 index 0000000000..a57aeff5c1 --- /dev/null +++ b/srcpkgs/darch/template @@ -0,0 +1,44 @@ +# Template file for 'darch' +pkgname=darch +version=0.18.3 +revision=1 +build_style=go +go_import_path=github.com/godarch/darch +hostmakedepends="git go" +depends="containerd" +only_for_archs="x86_64 x86_64-musl" +short_desc="A tool for building/booting stateless and immutable images, bare metal" +maintainer="Paul Knopf " +license="Apache-2.0" +homepage="https://godarch.com/" +make_dirs="/var/lib/darch 0755 root root" +conf_files="/etc/darch/hooks/ssh/hook /etc/darch/hooks/hostname/hook /etc/darch/hooks/fstab/hook" + +if [ "$XBPS_TARGET_MACHINE" != "x86_64" -a "$XBPS_TARGET_MACHINE" != "x86_64-musl" ]; then + broken="Darch is only usable on 64-bit systems." +fi + +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} +}