updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / haskell-unixutils / PKGBUILD
blobe1e88c1a9f2be8caed9ef07aff22149964d1742d
1 # custom variables
2 _hkgname=Unixutils
3 _licensefile=COPYING
5 # PKGBUILD options/directives
6 pkgname=haskell-unixutils
7 pkgver=1.46
8 pkgrel=3
9 pkgdesc="A crude interface between Haskell and Unix-like operating systems"
10 url="http://src.seereason.com/haskell-unixutils"
11 license=("BSD3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "haskell-hunit=1.2.2.3-2.1"
16          "haskell-mtl=2.0.1.0-3.1"
17          "haskell-parallel=3.1.0.1-3.1"
18          "haskell-puremd5=2.1.0.3-25"
19          "haskell-regex-tdfa=1.1.8-18"
20          "haskell-unix=2.4.2.0-2"
21          "haskell-zlib=0.5.3.1-2.1")
22 options=('strip')
23 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
24 install="${pkgname}.install"
25 sha256sums=("e7fb14a443a588d4e210bb0be99ec4d2bdf71829a27777bc6668c4f63efe14e1")
27 # PKGBUILD functions
28 build() {
29     cd ${srcdir}/${_hkgname}-${pkgver}
30     
31     runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
32         --prefix=/usr --docdir=/usr/share/doc/${pkgname} \
33         --libsubdir=\$compiler/site-local/\$pkgid
34     runhaskell Setup build
35     runhaskell Setup haddock
36     runhaskell Setup register --gen-script
37     runhaskell Setup unregister --gen-script
38     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
41 package() {
42     cd ${srcdir}/${_hkgname}-${pkgver}
43     install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
44     install    -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
45     install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
46     ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}
47     runhaskell Setup copy --destdir=${pkgdir}
48     install -D -m644 ${_licensefile} ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
49     rm -f ${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}