diff options
author | Tristan Webb | 2015-06-09 01:37:27 -0700 |
---|---|---|
committer | Tristan Webb | 2015-06-09 01:37:27 -0700 |
commit | 7109d6a3aa7d98ece0d8c8002fc2e9c8da557e2e (patch) | |
tree | b33a5ddad2230fd73b13b952f22084255f851b55 /PKGBUILD | |
download | aur-7109d6a3aa7d98ece0d8c8002fc2e9c8da557e2e.tar.gz |
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..35347dd599a6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Tristan Webb <tristan@fpcomplete.com> +pkgname=haskell-stack-git +_pkgname=stack +pkgver=20150609.9e3a332 +pkgrel=1 +pkgdesc="The Haskell Tool Stack" +arch=('i686' 'x86_64') +url="https://www.github.com/commercialhaskell/stack" +license=('BSD3') +depends=('libtinfo') +makedepends=('ghc' 'cabal-install') +optdepends=('docker: Use Docker images to build your project in a temporary container') +provides=('haskell-stack') +conflicts=('haskell-stack') +# install= +source=("${_pkgname}::git+git://localhost/stack.git") +md5sums=('SKIP') + +prepare() { + cd "$srcdir/${_pkgname}" + rm -rf .cabal-sandbox + cabal sandbox init + rm -f cabal.config + wget https://www.stackage.org/nightly/cabal.config + cabal update + cabal clean + cabal install --only-dependencies --reorder-goals --enable-tests +} + +build() { + cd "$srcdir/${_pkgname}" + BIN_DIR="$srcdir/${_pkgname}/bin" + SHARE_DIR="$srcdir/${_pkgname}/share" + mkdir -p $BIN_DIR + mkdir -p $SHARE_DIR + cabal install --disable-documentation \ + --disable-library-profiling \ + --bindir=$BIN_DIR +} + +check() { + cd "$srcdir/${_pkgname}" + cabal test +} + +package() { + cd "$srcdir/${_pkgname}" + BIN_DIR="$srcdir/${_pkgname}/bin/" + STACK_BIN=$BIN_DIR/stack + install -Dm755 $STACK_BIN "$pkgdir/usr/bin/stack" +} + +pkgver() { +cd "${srcdir}/${_pkgname}" + git log -1 --format='%cd.%h' --date=short | tr -d - +} + +# vim:set ts=2 sw=2 et: |