summaryrefslogtreecommitdiff
path: root/extra/cabal-install/PKGBUILD
blob: 7014a6fd0926e32990d342ebba603465af9a3d60 (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
# 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.20.0.3
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')
makedepends=('ghc')
depends=('gmp' 'zlib')
source=("http://hackage.haskell.org/packages/archive/cabal-install/${pkgver}/cabal-install-${pkgver}.tar.gz")
md5sums=('e1b382f8b4eae3762622cefc6d91d5f3')

build() {
  mkdir ${srcdir}/build
  export PREFIX="${srcdir}/build"

  cd cabal-install-${pkgver}

  sh bootstrap.sh --user
}

package() {
  install -D -m755 ${srcdir}/build/bin/cabal ${pkgdir}/usr/bin/cabal

  cd cabal-install-${pkgver}

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