updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / pandoc / PKGBUILD
blob4d9a1280931d396aa085b91599639c162f7e3c98
1 # Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar>
2 # Based on haskell-pandoc
3 # custom variables
4 _hkgname=pandoc
5 _licensefile=COPYING
7 # PKGBUILD options/directives
8 pkgname=pandoc
9 pkgver=1.8.2.1
10 pkgrel=2
11 pkgdesc='Conversion between markup formats (no Haskell libs)'
12 url='http://johnmacfarlane.net/pandoc'
13 license=('GPL')
14 arch=('i686' 'x86_64')
15 makedepends=('ghc' 'sh' 'haskell-http' 'haskell-base64-bytestring'
16 'haskell-bytestring' 'haskell-citeproc-hs' 'haskell-containers'
17 'haskell-directory' 'haskell-dlist' 'haskell-extensible-exceptions'
18 'haskell-filepath' 'haskell-json' 'haskell-mtl' 'haskell-network'
19 'haskell-old-time' 'haskell-pandoc-types' 'haskell-parsec' 'haskell-process'
20 'haskell-random' 'haskell-syb' 'haskell-tagsoup' 'haskell-texmath'
21 'haskell-utf8-string' 'haskell-xhtml' 'haskell-xml' 'haskell-zip-archive')
22 options=('strip')
23 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
24 sha256sums=('f1025377b2c78043b06d7963eb61ce66c2290d2580f2488a8186c82c24f09433')
25 conflicts=('haskell-pandoc')
27 # PKGBUILD functions
28 build() {
29     cd ${srcdir}/${_hkgname}-${pkgver}
30     
31     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
32         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
33         --libsubdir=\$compiler/site-local/\$pkgid
34     runhaskell Setup build
35     runhaskell Setup haddock
36     runhaskell Setup register --gen-script
37     runhaskell Setup unregister --gen-script
38     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 package() {
42     cd ${srcdir}/${_hkgname}-${pkgver}
43     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
44     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
45     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
46     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
47     runhaskell Setup copy --destdir=${pkgdir}
48     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
49     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}
51     msg2 "Removing Haskell libs"
52     rm -rvf ${pkgdir}/usr/lib