updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / haskell-persistent / PKGBUILD
blob2e234387013cacd78472aa5e8564b9f63488e454
1 # custom variables
2 _hkgname=persistent
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-persistent
7 pkgver=0.6.4
8 pkgrel=1
9 pkgdesc="Type-safe, non-relational, multi-backend persistence."
10 url="http://www.yesodweb.com/book/persistent"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-blaze-html=0.4.2.0-1"
16          "haskell-data-object=0.3.1.7-1"
17          "haskell-enumerator=0.4.15-1"
18          "haskell-monad-control=0.2.0.3-2"
19          "haskell-mtl=2.0.1.0-3.1"
20          "haskell-path-pieces=0.0.0-1"
21          "haskell-pool=0.1.1-2"
22          "haskell-text=0.11.0.5-2.1"
23          "haskell-transformers=0.2.2.0-3.1")
24 options=('strip')
25 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
26 install="${pkgname}.install"
27 sha256sums=("132be7b245a63620f91e845d0c2634f7f609f2ad2cff6ffec0d90c6ea2992d91")
29 # PKGBUILD functions
30 build() {
31     cd ${srcdir}/${_hkgname}-${pkgver}
32     
33     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
34         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
35         --libsubdir=\$compiler/site-local/\$pkgid
36     runhaskell Setup build
37     runhaskell Setup haddock
38     runhaskell Setup register --gen-script
39     runhaskell Setup unregister --gen-script
40     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
43 package() {
44     cd ${srcdir}/${_hkgname}-${pkgver}
45     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
46     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
47     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
48     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
49     runhaskell Setup copy --destdir=${pkgdir}
50     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
51     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}