updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / haskell-gtk / PKGBUILD
blob4f3b80900269a4d5388c08ec855b8c7791704dd1
1 # custom variables
2 _hkgname=gtk
3 _licensefile=COPYING
5 # PKGBUILD options/directives
6 pkgname=haskell-gtk
7 pkgver=0.12.1
8 pkgrel=1
9 pkgdesc="Binding to the Gtk+ graphical user interface library."
10 url="http://projects.haskell.org/gtk2hs/"
11 license=("LGPL-2.1")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-array=0.3.0.2"
17          "haskell-bytestring=0.9.1.10"
18          "haskell-cairo=0.12.1"
19          "haskell-containers=0.4.0.0"
20          "haskell-gio=0.12.1"
21          "haskell-glib=0.12.1"
22          "haskell-mtl=2.0.1.0"
23          "haskell-pango=0.12.1"
24          "glib"
25          "gtk2"
26          "gtk2hs-buildtools")
27 options=('strip')
28 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
29 install="${pkgname}.install"
30 sha256sums=("5b27295a98f07eb0e5963bfafb81bd38de87e1795d7a44d0886e45e15ceffc00")
32 # PKGBUILD functions
33 build() {
34     cd ${srcdir}/${_hkgname}-${pkgver}
35     
36     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
37         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
38         --libsubdir=\$compiler/site-local/\$pkgid
39     runhaskell Setup build
40     runhaskell Setup haddock
41     runhaskell Setup register --gen-script
42     runhaskell Setup unregister --gen-script
43     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
46 package() {
47     cd ${srcdir}/${_hkgname}-${pkgver}
48     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
49     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
50     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
51     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
52     runhaskell Setup copy --destdir=${pkgdir}
53     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
54     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}