2018-02-12 01:49:51 +00:00
|
|
|
# Template file for 'darch'
|
|
|
|
pkgname=darch
|
|
|
|
version=0.18.3
|
2018-03-30 16:30:06 +00:00
|
|
|
revision=3
|
2018-02-12 01:49:51 +00:00
|
|
|
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 <pauldotknopf@gmail.com>"
|
|
|
|
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}
|
|
|
|
}
|