summaryrefslogtreecommitdiff
path: root/community/xmonad-contrib/PKGBUILD
blob: 205da2aba5279e1d9bd3df19457479ba185be179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# $Id: PKGBUILD 116003 2014-07-19 16:05:38Z td123 $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: orbisvicis <gmail.com>

pkgname=xmonad-contrib
pkgver=0.11.2
pkgrel=4
pkgdesc="Add-ons for xmonad"
arch=('i686' 'x86_64')
url="http://xmonad.org/"
license=('BSD')
depends=('ghc=7.8.3-1' 'xmonad=0.11-9' 'sh' 'haskell-x11=1.6.1.2' 'haskell-x11-xft=0.3.1' 'haskell-utf8-string=0.3.7' 'haskell-random=1.0.1.1')
install='xmonad-contrib.install'
options=('staticlibs')
source=(http://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz 'remove_unnecessary_contexts.patch')
md5sums=('415a7ed9449198b0e93d49ab0a4a0f72'
         '724a45ea306054ddb7f8a42b185e708f')

prepare() {
  cd $srcdir/$pkgname-$pkgver
  patch -Np1 -i $srcdir/remove_unnecessary_contexts.patch
}

build() {
  cd $srcdir/$pkgname-$pkgver

  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
}