updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / haskell-snap-core / PKGBUILD
blob4085378c118241a2fd2842ad4a68898a8ed4e1cc
1 # custom variables
2 _hkgname=snap-core
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-snap-core
7 pkgver=0.5.5
8 pkgrel=4
9 pkgdesc="Snap: A Haskell Web Framework (Core)"
10 url="http://snapframework.com/"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-monadcatchio-transformers=0.2.2.3-1"
16          "haskell-attoparsec=0.9.1.2-1"
17          "haskell-attoparsec-enumerator=0.2.0.4-23"
18          "haskell-blaze-builder=0.3.0.1-18"
19          "haskell-blaze-builder-enumerator=0.2.0.3-2"
20          "haskell-bytestring-mmap=0.2.2-1"
21          "haskell-bytestring-nums=0.3.5-1"
22          "haskell-case-insensitive=0.3.0.1-2"
23          "haskell-deepseq=1.1.0.2-2.1"
24          "haskell-dlist=0.5-18"
25          "haskell-enumerator=0.4.15-1"
26          "haskell-mtl=2.0.1.0-3.1"
27          "haskell-text=0.11.0.5-2.1"
28          "haskell-transformers=0.2.2.0-3.1"
29          "haskell-unix=2.4.2.0-2"
30          "haskell-unix-compat=0.2.2.1-1"
31          "haskell-vector=0.9-1"
32          "haskell-zlib-enum=0.2.1-23")
33 options=('strip')
34 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
35 install="${pkgname}.install"
36 sha256sums=("72dedbc30a8e571299cc5e2cf331e3cd4dbf4c3b774047ce3928ce10dcb0a9d5")
38 # PKGBUILD functions
39 build() {
40     cd ${srcdir}/${_hkgname}-${pkgver}
41     
42     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
43         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
44         --libsubdir=\$compiler/site-local/\$pkgid
45     runhaskell Setup build
46     runhaskell Setup haddock
47     runhaskell Setup register --gen-script
48     runhaskell Setup unregister --gen-script
49     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
52 package() {
53     cd ${srcdir}/${_hkgname}-${pkgver}
54     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
55     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
56     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
57     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
58     runhaskell Setup copy --destdir=${pkgdir}
59     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
60     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}