archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / cbor-tool / trunk / PKGBUILD
bloba901303a8782b6b776a7ca469a15365489d6d912
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=cbor-tool
4 pkgver=0.2.2.0
5 pkgrel=34
6 pkgdesc="A tool for manipulating CBOR"
7 url="https://github.com/well-typed/cborg"
8 license=("BSD")
9 arch=('x86_64')
10 depends=('ghc-libs' 'haskell-aeson' 'haskell-aeson-pretty' 'haskell-cborg' 'haskell-cborg-json'
11          'haskell-scientific' 'haskell-unordered-containers' 'haskell-vector')
12 makedepends=('ghc' 'uusi')
13 source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
14 sha256sums=('d720f1caa98153bebea7ade4a0f1f53010a5febd2d53925c945e26f8c3b75667')
16 prepare() {
17   cd $pkgname-$pkgver
18   uusi -u aeson -u vector $pkgname.cabal
21 build() {
22   cd $pkgname-$pkgver
24   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
25     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --datasubdir=haskell-cbor-tool --enable-tests \
26     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
27     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
28     --ghc-option='-pie' 
30   runhaskell Setup build $MAKEFLAGS
33 check() {
34   cd $pkgname-$pkgver
35   runhaskell Setup test --show-details=direct
38 package() {
39   cd $pkgname-$pkgver
41   runhaskell Setup copy --destdir="$pkgdir"
42   install -D -m644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
43   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE.txt