1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 pkgname=haskell-floskell
7 pkgdesc="A flexible Haskell source code pretty printer"
8 url="https://github.com/ennocramer/floskell"
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-attoparsec'
12 'haskell-data-default' 'haskell-src-exts' 'haskell-monad-dijkstra'
13 'haskell-optparse-applicative' 'haskell-unordered-containers' 'haskell-utf8-string')
14 makedepends=('ghc' 'haskell-hspec')
15 source=("https://github.com/ennocramer/floskell/archive/floskell-$pkgver.tar.gz")
16 sha256sums=('b46c2bd16aaaf5d118793e622b69bf116aa3dea0d353bc2a573b7b52b7f1ff9b')
19 cd $_hkgname-floskell-$pkgver
21 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
22 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
23 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
24 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
27 runhaskell Setup build $MAKEFLAGS
28 runhaskell Setup register --gen-script
29 runhaskell Setup unregister --gen-script
30 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
31 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 cd $_hkgname-floskell-$pkgver
36 runhaskell Setup test --show-details=direct
40 cd $_hkgname-floskell-$pkgver
42 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
43 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
44 runhaskell Setup copy --destdir="$pkgdir"
45 install -D -m644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
46 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.md