5 # PKGBUILD options/directives
9 pkgdesc="BSON documents are JSON-like objects with a standard binary encoding"
10 url="http://github.com/TonyGen/bson-haskell"
11 license=("OtherLicense")
12 arch=('i686' 'x86_64')
14 depends=("ghc=7.0.3-2"
15 "haskell-binary=0.5.0.2-8"
16 "haskell-compact-string-fix=0.3.2-1"
17 "haskell-cryptohash=0.7.4-1"
18 "haskell-data-binary-ieee754=0.4.2.1-19"
19 "haskell-mtl=2.0.1.0-3.1"
20 "haskell-network=2.3.0.2-2.1")
22 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
23 install="${pkgname}.install"
24 sha256sums=("4320c8498b90d964a6c8744bc8a16ea26fb673b50f78a7c4e46d2cd3d1522d71")
28 cd ${srcdir}/${_hkgname}-${pkgver}
30 runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
31 --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
32 --libsubdir=\$compiler/site-local/\$pkgid
33 runhaskell Setup build
34 runhaskell Setup haddock
35 runhaskell Setup register --gen-script
36 runhaskell Setup unregister --gen-script
37 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 cd ${srcdir}/${_hkgname}-${pkgver}
42 install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
43 install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
44 install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
45 ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
46 runhaskell Setup copy --destdir=${pkgdir}
47 install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
48 rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}