archrelease: copy trunk to community-any
[arch-community.git] / haskell-floskell / trunk / PKGBUILD
blobcadf94d6e97c075b304f5a479f12baf17e33577b
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=floskell
4 pkgname=haskell-floskell
5 pkgver=0.10.7
6 pkgrel=32
7 pkgdesc="A flexible Haskell source code pretty printer"
8 url="https://github.com/ennocramer/floskell"
9 license=("BSD")
10 arch=('x86_64')
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')
18 build() {
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 \
25     --ghc-option='-pie'
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
34 check() {
35   cd $_hkgname-floskell-$pkgver
36   runhaskell Setup test --show-details=direct
39 package() {
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