upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-tree-diff / trunk / PKGBUILD
blob5c0a7818016f5ec2f0475c1d3cb159229c0fbad1
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=tree-diff
4 pkgname=haskell-tree-diff
5 pkgver=0.3.0.1
6 pkgrel=6
7 pkgdesc="Diffing of (expression) trees"
8 url="https://github.com/phadej/tree-diff"
9 license=('BSD')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-ansi-wl-pprint' 'haskell-ansi-terminal'
12          'haskell-base-compat' 'haskell-data-array-byte' 'haskell-hashable' 'haskell-parsers'
13          'haskell-primitive' 'haskell-quickcheck' 'haskell-scientific' 'haskell-semialign'
14          'haskell-strict' 'haskell-tagged' 'haskell-these' 'haskell-unordered-containers'
15          'haskell-uuid-types' 'haskell-vector')
16 makedepends=('ghc' 'uusi' 'haskell-trifecta' 'haskell-tasty' 'haskell-tasty-golden'
17              'haskell-tasty-quickcheck')
18 source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
19 sha512sums=('69244dcf5bca996e6c08500cf1841e68fda2a304fb811d788d2dd03e79076496bc12bfb1d3ac3f30c01929bbd617f009e2a78c1a7b23284cd41d1f78d8e6d20e')
21 prepare() {
22     cd $_hkgname-$pkgver
23     gen-setup
24     uusi -d bytestring-builder $_hkgname.cabal
27 build() {
28     cd $_hkgname-$pkgver
30     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
31         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
32         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
33     runhaskell Setup build $MAKEFLAGS
34     runhaskell Setup register --gen-script
35     runhaskell Setup unregister --gen-script
36     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
37     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
40 check() {
41     cd $_hkgname-$pkgver
42     runhaskell Setup test --show-details=direct
45 package() {
46     cd $_hkgname-$pkgver
48     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
49     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
50     runhaskell Setup copy --destdir="$pkgdir"
51     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
52     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE