updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / haskell-network-protocol-xmpp / PKGBUILD
blobac565fa49884b345780b22571fd7ca314b33ccdd
1 # custom variables
2 _hkgname=network-protocol-xmpp
3 _licensefile=License.txt
5 # PKGBUILD options/directives
6 pkgname=haskell-network-protocol-xmpp
7 pkgver=0.4
8 pkgrel=23
9 pkgdesc="Client->Server XMPP"
10 url="https://john-millikin.com/software/hs-xmpp/"
11 license=("GPL-3")
12 arch=('i686' 'x86_64')
13 makedepends=()
14 depends=("ghc=7.0.3-2"
15          "sh"
16          "haskell-bytestring=0.9.1.10"
17          "haskell-gnuidn=0.2"
18          "haskell-gnutls=0.1"
19          "haskell-gsasl=0.3.2"
20          "haskell-libxml-sax=0.7.2"
21          "haskell-monads-tf=0.1.0.0"
22          "haskell-network=2.3.0.2"
23          "haskell-text=0.11.0.5"
24          "haskell-transformers=0.2.2.0"
25          "haskell-xml-types=0.3")
26 options=('strip')
27 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
28 install="${pkgname}.install"
29 sha256sums=("a6ea62a4c6b46825fb6f4c897257d61cf88a960aa00d333a7e9cea962bf6d369")
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}