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