updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / haskell-ncurses / PKGBUILD
bloba7d1aa0ec877832b33152609a89f934e52912056
1 # custom variables
2 _hkgname=ncurses
3 _licensefile=license.txt
5 # PKGBUILD options/directives
6 pkgname=haskell-ncurses
7 pkgver=0.2
8 pkgrel=1
9 pkgdesc="Modernised bindings to GNU ncurses"
10 url="http://john-millikin.com/software/bindings/ncurses/"
11 license=("GPL-3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-containers=0.4.0.0"
17          "haskell-text=0.11.0.5"
18          "haskell-transformers=0.2.2.0"
19          "ncurses")
20 options=('strip')
21 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
22 install="${pkgname}.install"
23 sha256sums=("dd5c59ef7fdea903534a93165ccd52f1daa2396c7138352648490f88120db60b")
25 # PKGBUILD functions
26 build() {
27     cd ${srcdir}/${_hkgname}-${pkgver}
28     #NP
29     find . -name '*.c*' -print0 | xargs -0 \
30       sed -ie 's,ncursesw/,,g'
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}