upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-libmpd / trunk / PKGBUILD
blob604974fc8fd3251c6dfe4d83e8215dcf12483559
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributer: Colin Woodbury <colingw@gmail.com>
3 # Contributer: Leif Warner <abimelech@gmail.com>
4 # Contributor: Cedric Girard <girard.cedric@gmail.com>
5 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
7 _hkgname=libmpd
8 pkgname=haskell-libmpd
9 pkgver=0.10.0.0
10 pkgrel=129
11 pkgdesc='Client library for MPD, the Music Player Daemon'
12 url='https://hackage.haskell.org/package/libmpd'
13 license=('MIT')
14 arch=('x86_64')
15 depends=('ghc-libs' 'haskell-attoparsec' 'haskell-data-default-class' 'haskell-network'
16          'haskell-safe-exceptions' 'haskell-utf8-string')
17 makedepends=('ghc' 'haskell-quickcheck' 'haskell-hspec' 'haskell-hspec-discover')
18 #source=(${pkgname}-${pkgver}.tar.gz::https://github.com/vimus/libmpd-haskell/archive/v${pkgver}.tar.gz)
19 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
20 sha512sums=('33b2af4cbbcc2c6bb2f05ada685d8870ca5132559f8f0505da39f0deb290f1e15028d783c9b28fc51f785ed86878fbf40bb0be0487612cc2b600eaf619114c11')
22 build() {
23   cd ${_hkgname}-${pkgver}
24     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
25         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
26         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
27     runhaskell Setup build $MAKEFLAGS
28     runhaskell Setup haddock
29     runhaskell Setup register --gen-script
30     runhaskell Setup unregister --gen-script
31     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 check() {
36   cd ${_hkgname}-${pkgver}
37   runhaskell Setup test --show-details=direct
40 package() {
41   cd ${_hkgname}-${pkgver}
42   install -Dm 744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
43   install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
44   install -dm 755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
45   runhaskell Setup copy --destdir="$pkgdir"
47   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
48   install -Dm 644 README.md changelog.md -t "${pkgdir}/usr/share/doc/${pkgname}"
49   ln -s /usr/share/doc/${pkgname}/html "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
52 # vim: ts=2 sw=2 et: