void-packages/srcpkgs/stack/template

36 lines
1.2 KiB
Bash

# Template file for 'stack'
pkgname=stack
version=1.5.1
revision=1
_stackage="lts-9.0"
hostmakedepends="cabal-install pkg-config"
makedepends="zlib-devel pcre-devel"
depends="git iana-etc"
short_desc="Cross-platform program for developing Haskell projects"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="BSD-3"
homepage="http://haskellstack.org"
distfiles="https://github.com/commercialhaskell/stack/archive/v${version}.tar.gz
https://www.stackage.org/${_stackage}/cabal.config>cabal.config-${_stackage}"
skip_extraction="cabal.config-${_stackage}"
checksum="e55a8837f8f3663a09a52c653a94371cf2871256980c46e0f2b0d235f59f5a09
f4c044e4d85c873a90b58756c4744b2be513e2e2c7e089a271e2c292835f045b"
nocross=yes
nopie=yes # network-2.6.2.1 build fails with a relocation
do_build() {
cabal sandbox init
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/cabal.config-${_stackage} cabal.config
cabal update
cabal install ${makejobs} --only-dependencies
cabal install ${makejobs} cpphs
cabal configure -v --prefix=/usr --libsubdir='$pkg' \
--datasubdir='$pkg' --docdir='$datadir/doc/$pkg'
cabal build ${makejobs}
}
do_install() {
vbin dist/build/stack/stack
vlicense LICENSE
}