New build_style haskell-stack.

This commit is contained in:
Christian Neukirchen 2015-09-14 16:13:13 +02:00
parent 362bab72c8
commit 5093d6b0c1
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,28 @@
#
# This helper is for templates built using Haskell stack.
#
# hostmakedepends="ghc stack"
# make_build_args="stack-build-flags"
# stackage="lts-X.Y" # or include a stack.yaml in $FILESDIR
#
do_build() {
if [ -f "${FILESDIR}/stack.yaml" ]; then
msg_normal "Using stack config in stack.yaml.\n"
cp "${FILESDIR}/stack.yaml" .
else
if [ -z "$stackage" ]; then
msg_error "Stackage version not set in \$stackage.\n"
fi
msg_normal "Using stackage resolver ${stackage}.\n"
STACK_ROOT=$wrksrc/.stack \
stack init --force --resolver ${stackage}
fi
STACK_ROOT=$wrksrc/.stack stack ${makejobs} build ${make_build_args}
}
do_install() {
vmkdir usr/bin
STACK_ROOT=$wrksrc/.stack stack install ${make_build_args} \
--local-bin-path=${DESTDIR}/usr/bin
}

View File

@ -5,7 +5,7 @@
unset -v pkgname version revision short_desc homepage license maintainer
unset -v only_for_archs distfiles checksum build_style nocross broken
unset -v configure_script configure_args wrksrc build_wrksrc create_wrksrc
unset -v make_cmd make_build_args make_install_args make_build_target make_install_target python_versions
unset -v make_cmd make_build_args make_install_args make_build_target make_install_target python_versions stackage
unset -v patch_args disable_parallel_build keep_libtool_archives
unset -v reverts subpackages makedepends hostmakedepends depends restricted
unset -v build_pie build_options build_options_default bootstrap repository reverts