Date: Thursday, January 28, 2021 @ 23:40:49 Author: felixonmars Revision: 833620
archrelease: copy trunk to community-staging-x86_64 Added: haskell-bencode/repos/community-staging-x86_64/ haskell-bencode/repos/community-staging-x86_64/PKGBUILD (from rev 833619, haskell-bencode/trunk/PKGBUILD) ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Copied: haskell-bencode/repos/community-staging-x86_64/PKGBUILD (from rev 833619, haskell-bencode/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-01-28 23:40:49 UTC (rev 833620) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=bencode +pkgname=haskell-bencode +pkgver=0.6.1.1 +pkgrel=58 +pkgdesc="Parser and printer for bencoded data." +url="https://hackage.haskell.org/package/${_hkgname}" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-transformers-compat') +makedepends=('ghc' 'haskell-hspec' 'haskell-quickcheck') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('e2f4c312923412a47cbea62caf6e001e30418946165405f2cd9d77f06c13ff2846b352e28ca6cbbfce3bf236fb42f0b108442b17e2b0e8bac702af6d6a114f09') + +prepare() { + cd $_hkgname-$pkgver + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --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 +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test +} + +package() { + cd $_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 +}