ayaports/apk/main/haskell-catch-fd/APKBUILD
2022-01-23 03:09:53 +00:00

42 lines
1.6 KiB
Text

# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Arch Haskell Team <arch-haskell@haskell.org>
_hkgname=polyparse
pkgname=haskell-polyparse
pkgver=1.13
pkgrel=0
pkgdesc="A variety of alternative parser combinator libraries."
url="http://code.haskell.org/~malcolm/polyparse/"
license="LGPL"
arch='x86_64'
makedepends='ghc'
source="https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
prepare() {
cd $_hkgname-$pkgver
sed -i 's/< *4.14/<5/' $_hkgname.cabal
}
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 $MAKEFLAGS
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 "COPYRIGHT" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
rm -f "${pkgdir}/usr/share/doc/${pkgname}/COPYRIGHT"
}
sha512sums="3b66a73f97d6b5b6628193f87cae1ae1a68d63df0058532b2ac9a62af82dabe28e15fe1464075a2f436e70a7d20b57e72fdd7831f8b11035ff8117becb08d18e polyparse-1.13.tar.gz"