archrelease: copy trunk to community-any
[arch-community.git] / haskell-gi-gtk / trunk / PKGBUILD
blob91eec4e46ffa9d8fce7c2134c3b829f4549b21d8
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 _hkgname=gi-gtk
4 pkgname=haskell-gi-gtk
5 pkgver=4.0.6
6 pkgrel=49
7 pkgdesc="Gtk bindings"
8 url="https://github.com/haskell-gi/haskell-gi"
9 license=("LGPL2.1")
10 arch=('x86_64')
11 depends=('ghc-libs' 'haskell-gi-atk' 'haskell-gi-cairo' 'haskell-gi-gdk' 'haskell-gi-gdkpixbuf'
12          'haskell-gi-gio' 'haskell-gi-glib' 'haskell-gi-gobject' 'haskell-gi-graphene'
13          'haskell-gi-gsk' 'haskell-gi-pango' 'haskell-gi' 'haskell-gi-base' 'haskell-gi-overloading'
14          'gtk4')
15 makedepends=('ghc' 'gobject-introspection')
16 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
17 sha256sums=('ce7c87783bb970c60ab5c711a313f40a40fba4e9ad96439f09844a116e1fdd90')
19 build() {
20   cd $_hkgname-$pkgver
22   runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
23     --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
24     --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
25     --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
26     --ghc-option='-pie' 
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 check() {
36   cd $_hkgname-$pkgver
37   runhaskell Setup test --show-details=direct
40 package() {
41   cd $_hkgname-$pkgver
43   install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
44   install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
45   runhaskell Setup copy --destdir="$pkgdir"
46   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
47   rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE