updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / haskell-wai-handler-devel / PKGBUILD
blobc8093655ba5582b34d1e4e17a8e83e02343f4386
1 # custom variables
2 _hkgname=wai-handler-devel
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-wai-handler-devel
7 pkgver=0.4.3.1
8 pkgrel=7
9 pkgdesc="WAI server that automatically reloads code after modification."
10 url="http://github.com/snoyberg/wai-handler-devel"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-attoparsec-text=0.8.5.1-19"
16          "haskell-cmdargs=0.7-18"
17          "haskell-enumerator=0.4.15-1"
18          "haskell-hint=0.3.3.3-1"
19          "haskell-http-types=0.6.6-1"
20          "haskell-network=2.3.0.2-2.1"
21          "haskell-text=0.11.0.5-2.1"
22          "haskell-transformers=0.2.2.0-3.1"
23          "haskell-wai=0.4.2-4"
24          "haskell-wai-extra=0.4.4-1"
25          "haskell-warp=0.4.5-5")
26 options=('strip')
27 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
28 install="${pkgname}.install"
29 sha256sums=("17acdf21e0700b4f320ee39f2d3d00a34e7978b296d7dcfceecf5923473e3a76")
31 # PKGBUILD functions
32 build() {
33     cd ${srcdir}/${_hkgname}-${pkgver}
34     
35     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
36         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
37         --libsubdir=\$compiler/site-local/\$pkgid
38     runhaskell Setup build
39     runhaskell Setup haddock
40     runhaskell Setup register --gen-script
41     runhaskell Setup unregister --gen-script
42     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
45 package() {
46     cd ${srcdir}/${_hkgname}-${pkgver}
47     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
48     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
49     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
50     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
51     runhaskell Setup copy --destdir=${pkgdir}
52     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
53     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}