1 # Contributor: adam vogt <vogt. adam at gmail.com>
2 # Package generated by cabal2arch 0.6
3 pkgname=xmonad-contrib-darcs
6 pkgdesc="Third party extensions for xmonad"
7 url="http://hackage.haskell.org/package/xmonad-contrib"
8 license=('custom:BSD3')
10 conflicts=('xmonad-contrib')
12 depends=('haskell-x11-xft' 'xmonad-darcs')
15 install=xmonad-contrib.install
18 _darcsmod="XMonadContrib"
19 _darcstrunk="http://code.haskell.org"
23 if [[ -d ${srcdir}/$_darcsmod/_darcs ]]
25 msg "Retrieving missing patches"
27 darcs pull -a $_darcstrunk/$_darcsmod || return 1
29 msg "Retrieving complete sources"
30 darcs get --partial --set-scripts-executable $_darcstrunk/$_darcsmod || return 1
33 runhaskell Setup configure --prefix=/usr --flags="use_xft,use_utf8" --docdir=/usr/share/doc/${pkgname} || return 1
34 runhaskell Setup build || return 1
35 runhaskell Setup haddock || return 1
36 runhaskell Setup register --gen-script || return 1
37 runhaskell Setup unregister --gen-script || return 1
38 install -D -m744 register.sh ${pkgdir}/usr/share/haskell/$pkgname/register.sh
39 install -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh
40 install -d -m755 $pkgdir/usr/share/doc/ghc/libraries
41 runhaskell Setup copy --destdir=${pkgdir} || return 1
42 mkdir -p ${pkgdir}/usr/share/doc/ghc/html/libraries/
43 ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/xmonad-contrib
44 install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1
45 rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE