Date: Monday, June 15, 2020 @ 09:26:45 Author: felixonmars Revision: 644894
archrelease: copy trunk to community-staging-x86_64 Added: haskell-casa-types/repos/community-staging-x86_64/ haskell-casa-types/repos/community-staging-x86_64/PKGBUILD (from rev 644893, haskell-casa-types/trunk/PKGBUILD) ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Copied: haskell-casa-types/repos/community-staging-x86_64/PKGBUILD (from rev 644893, haskell-casa-types/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-06-15 09:26:45 UTC (rev 644894) @@ -0,0 +1,48 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=casa-types +pkgname=haskell-casa-types +pkgver=0.0.1 +pkgrel=40 +pkgdesc="Content Addressable Storage Archive types" +url="https://github.com/fpco/casa" +license=('MIT') +arch=('x86_64') +depends=('ghc-libs' 'haskell-aeson' 'haskell-attoparsec' 'haskell-base16-bytestring' + 'haskell-hashable' 'haskell-path-pieces' 'haskell-persistent') +makedepends=('ghc') +source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz) +sha512sums=('6296898e8ffdd20ad7dc5aa52a99078fa71bb2384a8631761255e19b7b670a1d349715241be8cb2ee84fd52ee7ac70b4458adab3a86ebe63b9c976f7bac44f98') + +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 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}