summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: efe955e9aee18bb5211e4beec5814fc73317ca13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>

pkgname=haskell-bytestring-builder
pkgver=0.10.8.1.0
pkgrel=1
pkgdesc="Provides methods for fully evaluating data structures (deep evaluation)"
arch=('i686' 'x86_64')
makedepends=('ghc')
url="https://github.com/lpsmith/bytestring-builder"
license=('BSD3')
source=(${pkgname#haskell-}-$pkgver.tar.gz::https://codeload.github.com/lpsmith/${pkgname#haskell-}/tar.gz/v$pkgver)
sha256sums=('030e668719f9dc7e6e229cb5ad424be0edfba267475f36885626b1ed0fc7e271')
options=('strip')
install=bytestring-builder.install

build() {
  cd "$srcdir/${pkgname#haskell-}-$pkgver"

  msg2 'Building...'
  runhaskell Setup configure \
              --prefix=/usr \
              --docdir=/usr/share/doc/bytestring-builder \
              --enable-split-objs \
              --enable-shared \
              -O -p
  runhaskell Setup build
  #runhaskell Setup haddock
  runhaskell Setup register --gen-script
  runhaskell Setup unregister --gen-script
  sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}

package() {
  cd "$srcdir/${pkgname#haskell-}-$pkgver"

  msg2 'Installing license...'
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/${pkgname#haskell-}/LICENSE"

  msg2 'Installing...'
  install -Dm 744 register.sh "$pkgdir/usr/share/haskell/${pkgname#haskell-}/register.sh"
  install -Dm 744 unregister.sh "$pkgdir/usr/share/haskell/${pkgname#haskell-}/unregister.sh"
  install -dm 755 "$pkgdir/usr/share/doc/ghc/html/libraries"
  ln -s /usr/share/doc/${pkgname#haskell-}/html "$pkgdir/usr/share/doc/ghc/html/libraries/${pkgname#haskell-}"
  runhaskell Setup copy --destdir=$pkgdir
  rm -f "$pkgdir/usr/share/doc/${pkgname#haskell-}/LICENSE"
}