updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / haskell-utility-ht / PKGBUILD
blobbda57acf9b1bef8180c1c211eae0f906f032aec3
1 # custom variables
2 _hkgname=utility-ht
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-utility-ht
7 pkgver=0.0.7.1
8 pkgrel=1
9 pkgdesc="Various small helper functions for Lists, Maybes, Tuples, Functions"
10 url="http://hackage.haskell.org/package/${_hkgname}"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 depends=('ghc' 'sh')
14 options=('strip')
15 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
16 sha256sums=('aaa262b8095933774ad1102530a9e85d20f4aad8f0dadcc2dbb267b3fd3c094c')
17 install="${pkgname}.install"
19 # PKGBUILD functions
20 build() {
21     cd ${srcdir}/${_hkgname}-${pkgver}
22     
23     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
24         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
25         --libsubdir=\$compiler/site-local/\$pkgid
26     runhaskell Setup build
27     runhaskell Setup haddock
28     runhaskell Setup register --gen-script
29     runhaskell Setup unregister --gen-script
30     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
33 package() {
34     cd ${srcdir}/${_hkgname}-${pkgver}
35     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
36     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
37     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
38     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
39     runhaskell Setup copy --destdir=${pkgdir}
40     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
41     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}