archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-xcffib / trunk / PKGBUILD
blob7c6069673e6d718ee307520b136d4172509e68aa
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=xcffib
4 pkgname=haskell-xcffib
5 pkgver=1.2.0
6 pkgrel=18
7 pkgdesc="A cffi-based python binding for X"
8 url="https://github.com/tych0/xcffib"
9 license=('Apache')
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-attoparsec' 'haskell-either' 'haskell-filemanip' 'haskell-language-python'
12          'haskell-optparse-applicative' 'haskell-split' 'haskell-xcb-types')
13 makedepends=('ghc' 'uusi')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('bf138ed8e3cc7ac7b63f60b9a18716f78a42dab79098d365e2f33c57dbd60ae032a20a08d342bdd956666c4fc99bb9786f88727a8da4b997ea6f4d02241fc211')
17 prepare() {
18     cd $_hkgname-$pkgver
19     gen-setup
22 build() {
23     cd $_hkgname-$pkgver
24     
25     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
27         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm
28     runhaskell Setup build $MAKEFLAGS
29     runhaskell Setup register --gen-script
30     runhaskell Setup unregister --gen-script
31     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 package() {
36     cd $_hkgname-$pkgver
37     
38     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
39     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
40     runhaskell Setup copy --destdir="$pkgdir"
41     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
42     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE