updated on Tue Jan 17 16:10:12 UTC 2012
[aur-mirror.git] / haskell-mongodb / PKGBUILD
blob5e2b9c12a3e68846a86108b3e0dc57b3a6a0eaa0
1 # custom variables
2 _hkgname=mongoDB
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-mongodb
7 pkgver=1.1.0
8 pkgrel=6
9 pkgdesc="Driver (client) for MongoDB, a free, scalable, fast, document DBMS"
10 url="http://github.com/TonyGen/mongoDB-haskell"
11 license=("OtherLicense")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-binary=0.5.0.2-8"
16          "haskell-bson=0.1.6-4"
17          "haskell-cryptohash=0.7.4-1"
18          "haskell-monad-control=0.2.0.3-2"
19          "haskell-mtl=2.0.1.0-3.1"
20          "haskell-network=2.3.0.2-2.1"
21          "haskell-parsec=3.1.1-2.1"
22          "haskell-random-shuffle=0.0.2-1")
23 options=('strip')
24 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
25 install="${pkgname}.install"
26 sha256sums=("03d9e13ab4b8c8c8f3273992aa0269a9884de098af94ee22abe6c8e86fa215af")
28 # PKGBUILD functions
29 build() {
30     cd ${srcdir}/${_hkgname}-${pkgver}
31     
32     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
33         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
34         --libsubdir=\$compiler/site-local/\$pkgid
35     runhaskell Setup build
36     runhaskell Setup haddock
37     runhaskell Setup register --gen-script
38     runhaskell Setup unregister --gen-script
39     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
42 package() {
43     cd ${srcdir}/${_hkgname}-${pkgver}
44     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
45     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
46     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
47     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
48     runhaskell Setup copy --destdir=${pkgdir}
49     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
50     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}