1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 pkgname=haskell-safecopy
7 pkgdesc="Binary serialization with version control."
8 url="https://github.com/acid-state/safecopy"
9 license=('custom:PublicDomain')
11 depends=('ghc-libs' 'haskell-cereal' 'haskell-generic-data' 'haskell-old-time' 'haskell-vector')
12 makedepends=('ghc' 'uusi' 'haskell-hunit' 'haskell-lens' 'haskell-lens-action' 'haskell-quickcheck'
13 'haskell-quickcheck-instances' 'haskell-tasty' 'haskell-tasty-quickcheck')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('2b6ae8488ac00bb5048e63886433aea6c2b13c9bea252fb8622ee1b673bce9e259639fbb68ef47a17ceac65edec2631ee95bc34a665c039f5c651d6192418bf5')
19 uusi -u lens -u vector $_hkgname.cabal
25 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
27 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
28 runhaskell Setup build $MAKEFLAGS
29 runhaskell Setup register --gen-script
30 runhaskell Setup unregister --gen-script
31 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
37 runhaskell Setup test --show-details=direct
43 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
44 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
45 runhaskell Setup copy --destdir="$pkgdir"