updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / haskell-hint / PKGBUILD
blob6146c171a4a0435824e61a92c507125c27d8651e
1 # custom variables
2 _hkgname=hint
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-hint
7 pkgver=0.3.3.3
8 pkgrel=2
9 pkgdesc="Runtime Haskell interpreter (GHC API wrapper)"
10 url="http://darcsden.com/jcpetruzza/hint"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc"
15          "haskell-monadcatchio-mtl"
16          "haskell-ghc-mtl"
17          "haskell-ghc-paths"
18          "haskell-haskell-src"
19          "haskell-mtl"
20          "haskell-unix"
21          "haskell-utf8-string")
22 options=('strip')
23 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
24 sha256sums=('b4709c29845936d49fb06ed42dd59c04eb16d51bd796b5ae1d811974043bed44')
25 install="${pkgname}.install"
27 # PKGBUILD functions
28 build() {
29     cd ${srcdir}/${_hkgname}-${pkgver}
30     
31     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
32         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
33         --libsubdir=\$compiler/site-local/\$pkgid
34     runhaskell Setup build
35     runhaskell Setup haddock
36     runhaskell Setup register --gen-script
37     runhaskell Setup unregister --gen-script
38     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 package() {
42     cd ${srcdir}/${_hkgname}-${pkgver}
43     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
44     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
45     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
46     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
47     runhaskell Setup copy --destdir=${pkgdir}
48     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
49     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}