archrelease: copy trunk to community-any
[arch-community.git] / clash-ghc / trunk / PKGBUILD
blobde8d2b027f8fc9ae7912c50c3f06f375bb332025
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=clash-ghc
4 pkgver=1.6.4
5 pkgrel=68
6 pkgdesc="CAES Language for Synchronous Hardware"
7 url="https://clash-lang.org/"
8 license=("BSD")
9 arch=('x86_64')
10 depends=('ghc-libs' 'haskell-clash-lib' 'haskell-clash-prelude' 'haskell-concurrent-supply'
11          'haskell-data-binary-ieee754' 'haskell-extra' 'haskell-ghc' 'haskell-ghc-typelits-extra'
12          'haskell-ghc-typelits-knownnat' 'haskell-ghc-typelits-natnormalise' 'haskell-hashable'
13          'haskell-lens' 'haskell-primitive' 'haskell-reflection' 'haskell-split' 'haskell-uniplate'
14          'haskell-unordered-containers' 'haskell-utf8-string' 'haskell-vector')
15 makedepends=('ghc' 'uusi')
16 conflicts=('clash')
17 source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz")
18 sha512sums=('b469a23efafc62b2a9be52e56f9d3c7b22db4c7bcabb655454f78739c879bf3629aca804d966a5f665b09459a9e29608ff1d0666f5dcca59a43b18b1951be62b')
20 prepare() {
21   cd $pkgname-$pkgver
22   uusi -u lens $pkgname.cabal
25 build() {
26   cd $pkgname-$pkgver
28   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
32     --ghc-option='-pie'
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
41 check() {
42   cd $pkgname-$pkgver
43   runhaskell Setup test --show-details=direct
46 package() {
47   cd $pkgname-$pkgver
49   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
50   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
51   runhaskell Setup copy --destdir="$pkgdir"
52   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
53   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE