-
-
Save stef204/5220e94b58a5204e3265 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom variables | |
_hkgname=vacuum-opengl | |
_licensefile=LICENSE | |
_ver=0.0.3 | |
_xrev=0 | |
# PKGBUILD options/directives | |
pkgname=haskell-vacuum-opengl | |
pkgver=${_ver}_${_xrev} | |
pkgrel=1 | |
pkgdesc="Visualize live Haskell data structures using vacuum, graphviz and OpenGL." | |
url="http://code.haskell.org/~bkomuves/" | |
license=("PublicDomain") | |
arch=('i686' 'x86_64') | |
makedepends=() | |
depends=("ghc=7.10.2-1" | |
"haskell-glut=2.7.0.2_0-4" | |
"haskell-opengl=2.13.0.0_0-4" | |
"haskell-bitmap=0.0.2_0-1" | |
"haskell-bitmap-opengl=0.0.1.5_0-1" | |
"haskell-network=2.6.2.1_0-3" | |
"haskell-stb-image=0.2.1_0-1" | |
"haskell-vacuum=2.2.0.0_0-1") | |
options=('strip' 'staticlibs') | |
source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${_ver}/${_hkgname}-${_ver}.tar.gz" | |
"original.cabal") | |
install="${pkgname}.install" | |
sha256sums=("f2fc00d6572c3d768a38daa6d377c242071593b8f60545e23e2b15b7ae1abcb7" | |
"09b493e3cf35b12fa250633460879076a769bdf63a737fbc024982230c77f983") | |
# PKGBUILD functions | |
prepare() { | |
cd "${srcdir}/${_hkgname}-${_ver}" | |
cp "${srcdir}/original.cabal" "${srcdir}/${_hkgname}-${_ver}/${_hkgname}.cabal" | |
# no source patch | |
} | |
build() { | |
cd "${srcdir}/${_hkgname}-${_ver}" | |
runhaskell Setup configure -O --enable-library-profiling --enable-shared \ | |
--prefix=/usr --docdir="/usr/share/doc/${pkgname}" \ | |
--libsubdir=\$compiler/site-local/\$pkgid \ | |
-fbase4 | |
runhaskell Setup build | |
runhaskell Setup haddock --hoogle --html | |
runhaskell Setup register --gen-script | |
runhaskell Setup unregister --gen-script | |
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh | |
} | |
package() { | |
cd "${srcdir}/${_hkgname}-${_ver}" | |
install -D -m744 register.sh "${pkgdir}/usr/share/haskell/${pkgname}/register.sh" | |
install -m744 unregister.sh "${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh" | |
install -d -m755 "${pkgdir}/usr/share/doc/ghc/html/libraries" | |
ln -s "/usr/share/doc/${pkgname}/html" "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}" | |
runhaskell Setup copy --destdir="${pkgdir}" | |
install -D -m644 "${_licensefile}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
rm -f "${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment