summaryrefslogtreecommitdiff
path: root/extra/cabal-install/PKGBUILD
blob: 406bd94ce5bc8cbe70b08fdd8727f7119bfe4be5 (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: Thomas Dziedzic <gostrc@gmail.com>
# Maintainer: Vesa Kaihlavirta <vesa@archlinux.org>
# Contributor: Arch Haskell Team <arch-haskell@haskell.org>

pkgname=cabal-install
pkgver=1.16.0.2
pkgrel=2
pkgdesc="The command-line interface for Cabal and Hackage."
url="http://hackage.haskell.org/package/cabal-install"
license=('custom:BSD3')
arch=('i686' 'x86_64' 'mips64el')
makedepends=('haskell-http=4000.2.7-1' 'haskell-zlib=0.5.4.0-1' 'haskell-mtl=2.1.2-2' 'haskell-network=2.4.1.0-1' 'haskell-random=1.0.1.1-4')
depends=('ghc' 'gmp' 'zlib')
source=("http://hackage.haskell.org/packages/archive/cabal-install/${pkgver}/cabal-install-${pkgver}.tar.gz")
md5sums=('18e07d5b431d19d94cc5279a5e6fbfee')

build() {
  cd cabal-install-${pkgver}

  runhaskell Setup configure \
    --enable-shared \
    --enable-split-objs \
    --enable-executable-stripping \
    --prefix=/usr

  runhaskell Setup build
}

package() {
  cd cabal-install-${pkgver}

  runhaskell Setup copy --destdir=$pkgdir

  # rm license installed to wrong location
  rm -rf ${pkgdir}/usr/share/doc

  install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
    
  # add bash completion
  install -d ${pkgdir}/usr/share/bash-completion/completions
  install -m644 bash-completion/cabal \
    ${pkgdir}/usr/share/bash-completion/completions
}