updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / haskell-test-framework / PKGBUILD
blob701cc3ebe01c8a5d474465a948d595e5086d38dd
1 # custom variables
2 _hkgname=test-framework
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-test-framework
7 pkgver=0.4.1.1
8 pkgrel=2
9 pkgdesc="Framework for running and organising tests, with HUnit and QuickCheck support"
10 url="http://batterseapower.github.com/test-framework/"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-ansi-terminal=0.5.5"
17          "haskell-ansi-wl-pprint=0.6.3"
18          "haskell-containers=0.4.0.0"
19          "haskell-extensible-exceptions=0.1.1.2"
20          "haskell-hostname=1.0"
21          "haskell-old-locale=1.0.0.2"
22          "haskell-random=1.0.0.3"
23          "haskell-regex-posix=0.94.4"
24          "haskell-time=1.2.0.3"
25          "haskell-xml=1.3.10")
26 options=('strip')
27 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
28 install="${pkgname}.install"
29 sha256sums=("ec0693c48d15e2fb74b0d8593b3f1b8a33202470d22376cdcb42ad8ebcd8e4c5")
31 # PKGBUILD functions
32 build() {
33     cd ${srcdir}/${_hkgname}-${pkgver}
34     
35     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
36         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
37         --libsubdir=\$compiler/site-local/\$pkgid
38     runhaskell Setup build
39     runhaskell Setup haddock
40     runhaskell Setup register --gen-script
41     runhaskell Setup unregister --gen-script
42     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
45 package() {
46     cd ${srcdir}/${_hkgname}-${pkgver}
47     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
48     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
49     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
50     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
51     runhaskell Setup copy --destdir=${pkgdir}
52     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
53     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}