archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-hosc / trunk / PKGBUILD
blobc24fa2ec044153128c88e340f252da72ae7c4a6d
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=hosc
4 pkgname=haskell-hosc
5 pkgver=0.20
6 pkgrel=10
7 pkgdesc="Haskell Open Sound Control"
8 arch=('x86_64')
9 url="https://github.com/rd--/hosc"
10 license=('GPL')
11 depends=('ghc-libs' 'haskell-blaze-builder' 'haskell-data-binary-ieee754' 'haskell-network')
12 makedepends=('ghc')
13 #source=("$pkgname-$pkgver.tar.gz::https://github.com/rd--/hosc/archive/${pkgver}.tar.gz")
14 source=("https://hackage.haskell.org/packages/archive/$_name/$pkgver/$_name-$pkgver.tar.gz")
15 sha512sums=('f04ea2cbb8a946c6aef246c4785518dd32f134c6d96643487402864d96a468244917091d36e8bf220ca64c5aab019ee859291354c3d8e50860d4169e9a6d0081')
17 prepare() {
18   mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
19   cd "$pkgname-$pkgver"
22 build() {
23   cd "$pkgname-$pkgver"
24   runhaskell Setup configure -O \
25                              --enable-shared \
26                              --enable-executable-dynamic \
27                              --disable-library-vanilla \
28                              --prefix=/usr \
29                              --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
30                              --enable-tests \
31                              --dynlibdir=/usr/lib \
32                              --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
33                              --datasubdir=$pkgname
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"
48   runhaskell Setup copy --destdir="${pkgdir}"
49   install -vDm 744 register.sh "$pkgdir/usr/share/haskell/register/$pkgname.sh"
50   install -vDm 744 unregister.sh "$pkgdir/usr/share/haskell/unregister/$pkgname.sh"