updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / hlint-darcs / PKGBUILD
blob370c9e216a71ddaf4b1a22b2ce3e2ddcbad4d3a4
1 # Contrubutor: Alexander Kreuzer <alex@freesources.org>
2 # based on hlint package from
3 # Arch Haskell Team <arch-haskell@haskell.org>
4 pkgname=hlint-darcs
5 pkgrel=1
6 pkgver=20111202
7 pkgdesc="Source code suggestions (darcs version)"
8 url="http://community.haskell.org/~ndm/hlint/"
9 license=('GPL')
10 arch=('i686' 'x86_64')
11 makedepends=('darcs')
12 depends=('ghc' 'haskell-cpphs' 'haskell-haskell-src-exts>=1.11' 'haskell-hscolour' 'haskell-mtl' 'haskell-uniplate')
13 provides=('hlint=1.8.20' 'haskell-hlint=1.8.20')
14 options=('strip')
15 install=hlint.install
16 source=()
17 md5sums=()
19 _darcsmod="hlint"
20 _darcstrunk="http://community.haskell.org/~ndm/darcs"
22 build() {
23     cd ${srcdir}
25     # Erasing previous build
26     msg "Checking for previous build"
27     # get the sources
28     if [[ -d $_darcsmod/_darcs ]]
29     then
30         msg "Retrieving missing patches"
31         cd $_darcsmod
32         darcs pull -a $_darcstrunk/$_darcsmod
33     else
34         msg "Retrieving complete sources"
35         darcs get --partial --set-scripts-executable $_darcstrunk/$_darcsmod
36         cd $_darcsmod
37     fi
39     runhaskell Setup configure --prefix=/usr --docdir=/usr/share/doc/${pkgname}
40     runhaskell Setup build                  
41     runhaskell Setup haddock
42     runhaskell Setup register   --gen-script
43     runhaskell Setup unregister --gen-script
46 package() {
47   cd $srcdir/$_darcsmod  
48   install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/$pkgname/register.sh
49   install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh
50   install -d -m755 $pkgdir/usr/share/doc/ghc/html/libraries
51   ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/hlint
52   runhaskell Setup copy --destdir=${pkgdir}