updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / haskell-cake / PKGBUILD
blob40e51d5423f28d3e61907a886dfd39059a7898e4
1 # custom variables
2 _hkgname=cake
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-cake
7 pkgver=0.1.0
8 pkgrel=7
9 pkgdesc="A build-system library and driver"
10 url="http://hackage.haskell.org/package/${_hkgname}"
11 license=("GPL")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-encode=1.3.5-1"
16          "haskell-binary=0.5.0.2-8"
17          "haskell-cmdargs=0.7-18"
18          "haskell-derive=2.5.4-4"
19          "haskell-mtl=2.0.1.0-3.1"
20          "haskell-puremd5=2.1.0.3-25"
21          "haskell-regex-tdfa=1.1.8-18"
22          "haskell-split=0.1.4.1-1")
23 options=('strip')
24 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
25         "cabal.patch")
26 install="${pkgname}.install"
27 sha256sums=("93168fb2f5a6c539326ac50f582b2988f2cbec9352603598b0b1d3c78bdd1c3a"
28             "f70a5c369f70d409974673562003c5b80153bd902ffca3bdcd585729e6b8e7a4")
30 # PKGBUILD functions
31 build() {
32     cd ${srcdir}/${_hkgname}-${pkgver}
33     patch cake.cabal ${srcdir}/cabal.patch 
34     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
35         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
36         --libsubdir=\$compiler/site-local/\$pkgid
37     runhaskell Setup build
38     runhaskell Setup haddock
39     runhaskell Setup register --gen-script
40     runhaskell Setup unregister --gen-script
41     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
44 package() {
45     cd ${srcdir}/${_hkgname}-${pkgver}
46     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
47     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
48     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
49     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
50     runhaskell Setup copy --destdir=${pkgdir}
51     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
52     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}