updated on Wed Jan 25 00:20:47 UTC 2012
[aur-mirror.git] / haskell-vty / PKGBUILD
blob6d217ad9ddb1ca98d74123833caf21bb229c35aa
1 # custom variables
2 _hkgname=vty
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-vty
7 pkgver=4.7.0.6
8 pkgrel=2
9 pkgdesc="A simple terminal access library"
10 url="https://github.com/coreyoconnor/vty"
11 license=('BSD3')
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc"
15          "haskell-deepseq"
16          "haskell-mtl"
17          "haskell-parallel"
18          "haskell-parsec"
19          "haskell-terminfo"
20          "haskell-unix"
21          "haskell-utf8-string"
22          "haskell-vector")
23 options=('strip')
24 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
25 sha256sums=('e3adfdc70604c77b4eb86dbf02aff13c89be64df451c48952e4b5e04396167c9')
26 install="${pkgname}.install"
28 # PKGBUILD functions
29 build() {
30     cd ${srcdir}/${_hkgname}-${pkgver}
31     
32     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
33         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
34         --libsubdir=\$compiler/site-local/\$pkgid
35     runhaskell Setup build
36     runhaskell Setup haddock
37     runhaskell Setup register --gen-script
38     runhaskell Setup unregister --gen-script
39     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
42 package() {
43     cd ${srcdir}/${_hkgname}-${pkgver}
44     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
45     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
46     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
47     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
48     runhaskell Setup copy --destdir=${pkgdir}
49     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
50     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}