# $Id: PKGBUILD 77341 2012-10-09 04:17:04Z tdziedzic $ # Maintainer: Sergej Pupykin pkgname=haskell-cairo pkgver=0.12.3.1 pkgrel=2 pkgdesc="Binding to the cairo library for Gtk2Hs." url="http://hackage.haskell.org/package/cairo" license=('LGPL2.1') arch=('i686' 'x86_64') depends=('ghc=7.6.1-1' 'cairo' 'haskell-mtl=2.1.2-1') makedepends=("gtk2hs-buildtools") options=('strip') conflicts=('gtk2hs-cairo') provides=('gtk2hs-cairo') replaces=('gtk2hs-cairo') install=gtk2hs-cairo.install source=(http://hackage.haskell.org/packages/archive/cairo/$pkgver/cairo-$pkgver.tar.gz) md5sums=('9d489fbb6cadb3d109543fe25c50195e') build() { cd ${srcdir}/cairo-$pkgver runhaskell Setup configure -O -p --enable-split-objs --enable-shared \ --prefix=/usr --docdir=/usr/share/doc/haskell-cairo \ --libsubdir=\$compiler/site-local/\$pkgid runhaskell Setup build runhaskell Setup haddock runhaskell Setup register --gen-script runhaskell Setup unregister --gen-script sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh } package() { cd ${srcdir}/cairo-${pkgver} install -D -m744 register.sh ${pkgdir}/usr/share/haskell/gtk2hs-cairo/register.sh install -m744 unregister.sh ${pkgdir}/usr/share/haskell/gtk2hs-cairo/unregister.sh install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries ln -s /usr/share/doc/haskell-cairo/html ${pkgdir}/usr/share/doc/ghc/html/libraries/cairo runhaskell Setup copy --destdir=${pkgdir} }