1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=postgresql-binary
5 pkgname=haskell-postgresql-binary
8 pkgdesc="Encoders and decoders for the PostgreSQL's binary format"
9 url="https://github.com/nikita-volkov/postgresql-binary"
12 depends=('ghc-libs' 'haskell-aeson' 'haskell-binary-parser' 'haskell-bytestring-strict-builder'
13 'haskell-network-ip' 'haskell-scientific' 'haskell-unordered-containers'
14 'haskell-uuid' 'haskell-vector')
15 makedepends=('ghc' 'uusi' 'haskell-postgresql-libpq' 'haskell-tasty' 'haskell-tasty-quickcheck'
16 'haskell-tasty-hunit' 'haskell-quickcheck' 'haskell-quickcheck-instances'
17 'haskell-rerebase' 'pifpaf' 'postgresql')
18 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
19 sha512sums=('471bd8c9fb97ef891fde094f616f246d6228f8eccc1c17a711e84604b1ea1f157f37ada4cfeb670d71afc83df11158cc16227d254bd8c00024dbf4351b6ac7ad')
24 # Do not use default postgres port
25 sed -i 's/5432/9824/' tasty/Main/DB.hs
31 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
32 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
33 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
34 runhaskell Setup build $MAKEFLAGS
35 runhaskell Setup register --gen-script
36 runhaskell Setup unregister --gen-script
37 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
38 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
44 eval $(pifpaf run postgresql --host 127.0.0.1)
45 createuser -s postgres
46 runhaskell Setup test --show-details=direct
53 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
54 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
55 runhaskell Setup copy --destdir="$pkgdir"
56 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
57 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE