updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / haskell-citeproc-hs / PKGBUILD
blob45ecb9b3b14a1bb2051c625cfc3b61c281658928
1 # custom variables
2 _hkgname=citeproc-hs
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-citeproc-hs
7 pkgver=0.3.3
8 pkgrel=2
9 pkgdesc="A Citation Style Language implementation in Haskell"
10 url="http://gorgias.mine.nu/repos/citeproc-hs/"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-http=4000.1.1"
17          "haskell-bytestring=0.9.1.10"
18          "haskell-containers=0.4.0.0"
19          "haskell-directory=1.1.0.0"
20          "haskell-filepath=1.2.0.0"
21          "haskell-hs-bibutils=4.12"
22          "haskell-json=0.4.4"
23          "haskell-mtl=2.0.1.0"
24          "haskell-network=2.3.0.2"
25          "haskell-old-locale=1.0.0.2"
26          "haskell-pandoc-types=1.8.2"
27          "haskell-parsec=3.1.1"
28          "haskell-syb=0.3"
29          "haskell-time=1.2.0.3"
30          "haskell-utf8-string=0.3.6"
31          "haskell-xml=1.3.10")
32 options=('strip')
33 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
34 install="${pkgname}.install"
35 sha256sums=("249bc0ec589fc79b098867502732c3c47ce032ad32f82d3280c1ca9373c71f7a")
37 # PKGBUILD functions
38 build() {
39     cd ${srcdir}/${_hkgname}-${pkgver}
40     
41     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
42         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
43         --libsubdir=\$compiler/site-local/\$pkgid
44     runhaskell Setup build
45     runhaskell Setup haddock
46     runhaskell Setup register --gen-script
47     runhaskell Setup unregister --gen-script
48     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
51 package() {
52     cd ${srcdir}/${_hkgname}-${pkgver}
53     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
54     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
55     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
56     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
57     runhaskell Setup copy --destdir=${pkgdir}
58     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
59     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}