# $Id: PKGBUILD 72322 2012-06-11 17:27:12Z tdziedzic $ # Maintainer: Sergej Pupykin # Maintainer: Vesa Kaihlavirta # Contributor: orbisvicis pkgname=xmonad-contrib pkgver=0.10 pkgrel=4 pkgdesc="Add-ons for xmonad" arch=('i686' 'x86_64') url="http://xmonad.org/" license=('BSD') depends=('ghc=7.4.2-1' 'xmonad=0.10-4' 'sh' 'haskell-x11=1.6.0' 'haskell-x11-xft=0.3.1-4' 'haskell-utf8-string=0.3.7-2' 'haskell-random=1.0.1.1-2') install='xmonad-contrib.install' source=(http://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz xmonad-contrib-0.10-x11-1.6.patch) md5sums=('9a4353a94ec0ea3a9c4700757ef5ae81' '32163aaeb3424cf73bf831640c162a8a') build() { cd $srcdir/$pkgname-$pkgver # Patch xmonad-contrib to support haskell-x11 patch -Np1 -i $srcdir/xmonad-contrib-0.10-x11-1.6.patch runhaskell Setup.lhs configure --ghc --enable-shared --enable-split-objs --prefix=/usr -fuse_xft \ --libsubdir=\$compiler/site-local/\$pkgid runhaskell Setup build runhaskell Setup register --gen-script runhaskell Setup unregister --gen-script sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh } package() { cd $srcdir/$pkgname-$pkgver install -D -m744 register.sh $pkgdir/usr/share/haskell/$pkgname/register.sh install -m744 unregister.sh $pkgdir/usr/share/haskell/$pkgname/unregister.sh runhaskell Setup.lhs copy --destdir=$pkgdir install -D LICENSE $pkgdir/usr/share/licenses/xmonad-contrib/LICENSE }