void-packages/srcpkgs/stack/template

37 lines
1.3 KiB
Bash

# Template file for 'stack'
pkgname=stack
version=1.7.1
revision=1
_stackage="lts-12.0"
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="a548fb549b2b1e539e257732596508e4c3d43e3a9d62bd22ecc19dda67c30ce6
5cc57cdd4fe15dc8cbb02ef9e57838e224db7bcb5383c22d6bca5c027f3bee7b"
nocross=yes
nopie_files="/usr/bin/stack"
do_build() {
cabal sandbox init
cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/cabal.config-${_stackage} cabal.config
sed -i 's/\(hpack\|temporary\|store\|fsnotify\|exceptions\|aeson\) .*/\1/' stack.cabal
cabal update
cabal install ${makejobs} cpphs happy
cabal install ${makejobs} --only-dependencies
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
}