updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / haskell-haxml / PKGBUILD
blob426d364896c4b5dcd3152dc02d16c145fdabdd47
1 # custom variables
2 _hkgname=HaXml
3 _licensefile=COPYRIGHT
5 # PKGBUILD options/directives
6 pkgname=haskell-haxml
7 pkgver=1.20.2
8 pkgrel=19
9 pkgdesc="Utilities for manipulating XML documents"
10 url="http://www.cs.york.ac.uk/fp/HaXml/"
11 license=("LGPL")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-bytestring=0.9.1.10"
17          "haskell-containers=0.4.0.0"
18          "haskell-filepath=1.2.0.0"
19          "haskell-haskell98=1.1.0.1"
20          "haskell-polyparse=1.7"
21          "haskell-pretty=1.0.1.2"
22          "haskell-random=1.0.0.3")
23 options=('strip')
24 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
25 install="${pkgname}.install"
26 sha256sums=("c32c10b95446ecb938dc6cd34585187efd3fcb4b21f7d0c7cbd646ba94c87516")
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}