1 # Maintainer: Arch Haskell Team <arch-haskell@haskell.org>
3 pkgname=haskell-serialport
6 pkgdesc="Cross platform serial port library."
7 url="http://hackage.haskell.org/package/${_hkgname}"
8 license=('custom:BSD3')
11 depends=('ghc' 'haskell-unix=2.4.0.2')
13 source=(http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
14 install=${pkgname}.install
16 cd ${srcdir}/${_hkgname}-${pkgver}
17 runhaskell Setup configure -O --enable-split-objs --enable-shared \
18 --prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
19 runhaskell Setup build
20 runhaskell Setup haddock
21 runhaskell Setup register --gen-script
22 runhaskell Setup unregister --gen-script
23 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
26 cd ${srcdir}/${_hkgname}-${pkgver}
27 install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
28 install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
29 install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
30 ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
31 runhaskell Setup copy --destdir=${pkgdir}
32 install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
33 rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
35 md5sums=('74c584b890cda1a8a6b9bcb21158a6bc')