archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / haskell-alsa-core / trunk / PKGBUILD
blob2ce1cdd9d83d97b1a8a917999094690c15c24cf5
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 _hkgname=alsa-core
4 pkgname=haskell-${_hkgname}
5 pkgver=0.5.0.1
6 pkgrel=17
7 pkgdesc='Binding to the ALSA Library API (Exceptions)'
8 url='http://www.haskell.org/haskellwiki/ALSA'
9 license=('BSD')
10 arch=('x86_64')
11 depends=('ghc-libs' 'glibc' 'gmp' 'alsa-lib' 'haskell-base' 'haskell-extensible-exceptions')
12 makedepends=('ghc')
13 source=(https://hackage.haskell.org/package/${_hkgname}-${pkgver}/${_hkgname}-${pkgver}.tar.gz)
14 sha256sums=('eb50495ef05ecc7c06a0147da7f0d3efde832a44d23caaf5172dc114882270ab')
15 sha512sums=('e02c8353911bf2c0c703400701ae72be6f510f771ff56dfc09322cbcf3a006f4cd0903f71f7ed2268886b3468113d5ce76933eedf5fad47aa71cb052d07fc4b4')
17 build() {
18   cd ${_hkgname}-${pkgver}
19     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
20         --prefix=/usr --docdir=/usr/share/doc/$pkgname \
21         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
22         --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
23         --ghc-option='-pie'
24     runhaskell Setup build $MAKEFLAGS
25     runhaskell Setup haddock
26     runhaskell Setup register --gen-script
27     runhaskell Setup unregister --gen-script
28     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
29     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
32 check() {
33   cd ${_hkgname}-${pkgver}
34   runhaskell Setup test --show-details=direct
37 package() {
38   cd ${_hkgname}-${pkgver}
39   install -Dm 744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
40   install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
41   install -dm 755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
42   runhaskell Setup copy --destdir="$pkgdir"
44   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
45   ln -s /usr/share/doc/${pkgname}/html "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
48 # vim: ts=2 sw=2 et: