updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / haskell-cmdargs / PKGBUILD
bloba95791758c9f9e766af41607ba01856ac95879ce
1 # custom variables
2 _hkgname=cmdargs
3 _licensefile=LICENSE
5 # PKGBUILD options/directives
6 pkgname=haskell-cmdargs
7 pkgver=0.7
8 pkgrel=18
9 pkgdesc="Command line argument processing"
10 url="http://community.haskell.org/~ndm/cmdargs/"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-transformers=0.2.2.0")
17 options=('strip')
18 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
19 install="${pkgname}.install"
20 sha256sums=("78037648a84f77ffc91a3a16aeec99ba56efba0d846a71c41419386358733262")
22 # PKGBUILD functions
23 build() {
24     cd ${srcdir}/${_hkgname}-${pkgver}
25     
26     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
27         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
28         --libsubdir=\$compiler/site-local/\$pkgid
29     runhaskell Setup build
30     runhaskell Setup haddock
31     runhaskell Setup register --gen-script
32     runhaskell Setup unregister --gen-script
33     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
36 package() {
37     cd ${srcdir}/${_hkgname}-${pkgver}
38     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
39     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
40     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
41     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
42     runhaskell Setup copy --destdir=${pkgdir}
43     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
44     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}