updated on Tue Jan 10 08:08:34 UTC 2012
[aur-mirror.git] / haskell-json-enumerator / PKGBUILD
blobe541edf5638a51c037cfbaa6331a05e7afa4a610
1 # custom variables
2 _hkgname=json-enumerator
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-json-enumerator
7 pkgver=0.0.1.1
8 pkgrel=22
9 pkgdesc="Pure-Haskell utilities for dealing with JSON with the enumerator package."
10 url="http://github.com/snoyberg/json-enumerator"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-blaze-builder=0.3.0.1"
17          "haskell-blaze-builder-enumerator=0.2.0.3"
18          "haskell-bytestring=0.9.1.10"
19          "haskell-containers=0.4.0.0"
20          "haskell-enumerator=0.4.14"
21          "haskell-json-types=0.1"
22          "haskell-text=0.11.0.5"
23          "haskell-transformers=0.2.2.0")
24 options=('strip')
25 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
26 install="${pkgname}.install"
27 sha256sums=("f47c42460679a2c52cb35e1474e5955542f336a0c5ab87d8c2f92ace77ea244d")
29 # PKGBUILD functions
30 build() {
31     cd ${srcdir}/${_hkgname}-${pkgver}
32     
33     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
34         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
35         --libsubdir=\$compiler/site-local/\$pkgid
36     runhaskell Setup build
37     runhaskell Setup haddock
38     runhaskell Setup register --gen-script
39     runhaskell Setup unregister --gen-script
40     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
43 package() {
44     cd ${srcdir}/${_hkgname}-${pkgver}
45     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
46     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
47     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
48     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
49     runhaskell Setup copy --destdir=${pkgdir}
50     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
51     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}