updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / haskell-hlint / PKGBUILD
blob9a901edd7ac76b201543225e066648923bfbb3f5
1 # custom variables
2 _hkgname=hlint
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-hlint
7 pkgver=1.8.20
8 pkgrel=1
9 pkgdesc="Source code suggestions"
10 url="http://community.haskell.org/~ndm/hlint/"
11 license=('GPL')
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc"
15          "haskell-cpphs"
16          "haskell-haskell-src-exts"
17          "haskell-hscolour"
18          "haskell-transformers"
19          "haskell-uniplate")
20 options=('strip')
21 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
22 sha256sums=('d06f43003e5b61dcfd105aa3e309c9463a347883cf767530a6687bd1d5a67b5a')
23 install="${pkgname}.install"
25 # PKGBUILD functions
26 build() {
27     cd ${srcdir}/${_hkgname}-${pkgver}
28     
29     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
30         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
31         --libsubdir=\$compiler/site-local/\$pkgid
32     runhaskell Setup build
33     runhaskell Setup haddock
34     runhaskell Setup register --gen-script
35     runhaskell Setup unregister --gen-script
36     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
39 package() {
40     cd ${srcdir}/${_hkgname}-${pkgver}
41     install -Dm744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
42     install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
43     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
44     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
45     runhaskell Setup copy --destdir=${pkgdir}
46     install -Dm644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
47     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}