updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / haskell-data-binary-ieee754 / PKGBUILD
blob3976e3a81fd9505fffa4d7bcfdbc7b30fb79e19f
1 # custom variables
2 _hkgname=data-binary-ieee754
3 _licensefile=License.txt
5 # PKGBUILD options/directives
6 pkgname=haskell-data-binary-ieee754
7 pkgver=0.4.2.1
8 pkgrel=19
9 pkgdesc="Parser/Serialiser for IEEE-754 floating-point values"
10 url="http://john-millikin.com/software/data-binary-ieee754/"
11 license=("MIT")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-binary=0.5.0.2-8")
16 options=('strip')
17 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 install="${pkgname}.install"
19 sha256sums=("7f26a8f647ee77ba4d7674df4fb39c5eb96c3eff6c502deea50e158430651644")
21 # PKGBUILD functions
22 build() {
23     cd ${srcdir}/${_hkgname}-${pkgver}
24     
25     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
26         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
27         --libsubdir=\$compiler/site-local/\$pkgid
28     runhaskell Setup build
29     runhaskell Setup haddock
30     runhaskell Setup register --gen-script
31     runhaskell Setup unregister --gen-script
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 package() {
36     cd ${srcdir}/${_hkgname}-${pkgver}
37     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
38     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
39     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
40     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
41     runhaskell Setup copy --destdir=${pkgdir}
42     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
43     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}