void-packages/srcpkgs/stack/template
2018-03-03 22:32:03 +00:00

36 lines
1.2 KiB
Bash

# Template file for 'stack'
pkgname=stack
version=1.6.5
revision=1
_stackage="lts-10.7"
hostmakedepends="cabal-install pkg-config unzip"
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="3-clause-BSD"
homepage="http://haskellstack.org"
distfiles="https://github.com/commercialhaskell/${pkgname}/releases/download/v${version}/${pkgname}-${version}-sdist-1.tar.gz
https://www.stackage.org/${_stackage}/cabal.config>cabal.config-${_stackage}"
skip_extraction="cabal.config-${_stackage}"
checksum="71d02e2a3b507dcde7596f51d9a342865020aa74ebe79847d7bf815e1c7f2abb
0ada04a2f46cafa2139bf1b47c3186004fa9aa260fa54887f4a979535404fe25"
nocross=yes
nopie_files="/usr/bin/stack"
do_build() {
cabal sandbox init
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/cabal.config-${_stackage} cabal.config
sed -i '/hpack/d' 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
}