# custom variables _hkgname=xdg-basedir # PKGBUILD options/directives pkgname=haskell-xdg-basedir pkgver=0.2.2 pkgrel=1 license=('BSD3') pkgdesc="A basic implementation of the XDG Base Directory specification." url="http://github.com/willdonnelly/xdg-basedir" arch=('i686' 'x86_64') depends=("ghc") source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") sha256sums=("e461c3a5c6007c55ceaea03be3be0ef3a92aa0ea1aea936da0c43671bbfaf42b") # PKGBUILD functions build() { cd "${srcdir}/${_hkgname}-${pkgver}" runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \ --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 -Dm 744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh" install -Dm 744 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" }