# $Id$ # Maintainer: Emanuel Couto # Contributor: Daniel Nagy _hkgname=OpenGL pkgname=haskell-opengl pkgver=3.0.2.0 pkgrel=1 pkgdesc="A binding for the OpenGL graphics system" url="http://www.haskell.org/haskellwiki/Opengl" license=('custom:BSD3') arch=('i686' 'x86_64') depends=('ghc-libs' 'haskell-gluraw' 'haskell-objectname' 'haskell-openglraw' 'haskell-statevar' 'haskell-text' 'haskell-transformers') makedepends=('ghc') source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") sha512sums=('f562d0ca75321a443aec46d457741a52a6adbfd9a9710d4444f7f1c3e71f774f62f46129f7b30418382172beba60aab41c93ad4c7d3938474999e4512cc0fa5f') build() { cd "${srcdir}/${_hkgname}-${pkgver}" runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid runhaskell Setup build runhaskell Setup register --gen-script runhaskell Setup unregister --gen-script sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh } package() { cd "${srcdir}/${_hkgname}-${pkgver}" install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh" install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh" runhaskell Setup copy --destdir="${pkgdir}" install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" }