summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b80f42fb8a8b7e920860f3d6434365c4389acd2d (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
44
45
46
47
# Maintainer: Chan Beom Park <cbpark@gmail.com>

_hkgname=threadscope
pkgname=haskell-threadscope
pkgver=0.2.13
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'
         'haskell-temporary')
makedepends=('ghc')
source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
sha512sums=('d8a4c17db945836c0ed552c5b66bde795d7f85bd2e85af8b7c00b6408d31efe082bbf138e9c0436734ab8dc9acb1cb6341a147f8718c3951f95afdedf605539d')

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

    sed -i 's/gtk >= 0.12 && < 0.16,/gtk,/' threadscope.cabal
    sed -i 's/template-haskell < 2.16,/template-haskell,/' threadscope.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"
}