updated on Sat Jan 21 04:00:54 UTC 2012
[aur-mirror.git] / haskell-hsh / PKGBUILD
blob6944f009666c802f1ec9dd9e44c6a4805c016642
1 # custom variables
2 _hkgname=HSH
3 _licensefile=COPYRIGHT
5 # PKGBUILD options/directives
6 pkgname=haskell-hsh
7 pkgver=2.0.3
8 pkgrel=20
9 pkgdesc="Library to mix shell scripting with Haskell programs"
10 url="http://software.complete.org/hsh"
11 license=("LGPL")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-missingh=1.1.1.0"
17          "haskell-bytestring=0.9.1.10"
18          "haskell-directory=1.1.0.0"
19          "haskell-filepath=1.2.0.0"
20          "haskell-hslogger=1.1.5"
21          "haskell-mtl=2.0.1.0"
22          "haskell-process=1.0.1.5"
23          "haskell-regex-base=0.93.2"
24          "haskell-regex-compat=0.93.1"
25          "haskell-regex-posix=0.94.4"
26          "haskell-unix=2.4.2.0")
27 options=('strip')
28 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
29 install="${pkgname}.install"
30 sha256sums=("a27fcbb16e4538af526af0eceadd8b181acb4f0e7750ae2c477e25a7f8afcd82")
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}