summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b3d7afc4b4afde993d92113febca86fb22d30d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: Chan Beom Park <cbpark@gmail.com>

_hkgname=threadscope
pkgname=haskell-threadscope
pkgver=0.2.9
pkgrel=1
pkgdesc="A graphical viewer for thread profile information generated by the Glasgow Haskell compiler (GHC)."
url="http://hackage.haskell.org/package/${_hkgname}"
arch=('x86_64')
license=('custom:BSD3')
depends=('ghc-libs'
         'haskell-cairo'
         'haskell-ghc-events'
         'haskell-glib'
         'haskell-gtk2'
         'haskell-mtl'
         'haskell-pango'
         'haskell-text'
         'haskell-file-embed')
makedepends=('ghc')
source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
sha512sums=('0369210b93d99a749cf09ed51724cbfa099544108c91638442a10d504fe1a4bbca933432b479475f8b599dcebb148d7896194f32e078564120806b6e4f1e6724')

prepare() {
    sed -i 's/ghc-events >= 0.5 && < 0.7,/ghc-events >= 0.5,/' ${_hkgname}-${pkgver}/${_hkgname}.cabal
}

build() {
    cd "${srcdir}/${_hkgname}-${pkgver}"

    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
        --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" \
        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
    runhaskell Setup build
}

package() {
    cd "${srcdir}/${_hkgname}-${pkgver}"

    runhaskell Setup copy --destdir="${pkgdir}"
    install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
}