Skip to content

Instantly share code, notes, and snippets.

@LeifW LeifW/PKGBUILD
Created Jan 24, 2018

Embed
What would you like to do?
Arch Linux package script for Haskell's hint library
# $Id$
# Maintainer: Daniel Martí <mvdan@mvdan.cc>
_hkgname=hint
pkgname=haskell-hint
pkgver=0.7.0
pkgrel=1
pkgdesc="Runtime Haskell interpreter (GHC API wrapper)"
url="https://github.com/mvdan/$_hkgname"
license=('BSD')
arch=('i686' 'x86_64')
depends=('haskell-directory' 'haskell-exceptions' 'haskell-filepath' 'haskell-ghc-paths' 'haskell-mtl' 'haskell-random')
makedepends=('ghc')
source=("https://hackage.haskell.org/package/$_hkgname-$pkgver/$_hkgname-$pkgver.tar.gz")
md5sums=('824314f732e20ff50aa3d3acbcac84a9')
build() {
cd "${srcdir}/${_hkgname}-${pkgver}"
runhaskell Setup configure -O --enable-shared --disable-library-vanilla \
--prefix=/usr --docdir="/usr/share/doc/${pkgbase}" --datasubdir="$pkgbase" \
--libsubdir=\$compiler/site-local/\$pkgid \
-fgpl -fthreaded
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}-${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"
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 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.