Date: Tuesday, June 7, 2022 @ 06:23:28 Author: felixonmars Revision: 1227599
archrelease: copy trunk to community-staging-x86_64 Added: haskell-sandi/repos/community-staging-x86_64/ haskell-sandi/repos/community-staging-x86_64/PKGBUILD (from rev 1227598, haskell-sandi/trunk/PKGBUILD) ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Copied: haskell-sandi/repos/community-staging-x86_64/PKGBUILD (from rev 1227598, haskell-sandi/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2022-06-07 06:23:28 UTC (rev 1227599) @@ -0,0 +1,50 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Arch Haskell Team <arch-hask...@haskell.org> + +_hkgname=sandi +pkgname=haskell-sandi +pkgver=0.5 +pkgrel=316 +pkgdesc="Data encoding library" +url="https://hackage.haskell.org/package/sandi" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-conduit') +makedepends=('ghc' 'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck' + 'haskell-tasty-th') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('8abff3496d0d3f082f12416eea3189e06d1663fe78d996159396ab944389b2a816853c0191edced3b176fc506dac60e9ce84347ecaf2c255e5ec0d6b1590c012') + +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 --datasubdir=$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \ + -fwith-conduit + 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 --show-details=direct +} + +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 +}