archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-cairo-gobject / trunk / PKGBUILD
blob12b6cdbaf3deef734acfd415f74f5defce5b499d
1 # Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
2 # Contributor: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
4 _gemname=cairo-gobject
5 pkgname=ruby-$_gemname
6 pkgver=4.1.2
7 pkgrel=1
8 pkgdesc='Ruby/CairoGObject is a Ruby binding of cairo-gobject'
9 arch=(x86_64)
10 url='http://ruby-gnome2.sourceforge.jp/'
11 license=(LGPL2.1)
12 depends=(ruby ruby-cairo ruby-glib2=$pkgver)
13 options=(!emptydirs)
14 source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
15 noextract=($_gemname-$pkgver.gem)
16 sha256sums=('b3fc148c6416a46216045683299e774345c665ab3a1860b0482ff7646e39c0e0')
18 package() {
19   local _gemdir="$(ruby -e'puts Gem.default_dir')"
20   local _platform="$(gem env platform | cut -d':' -f2)"
21   local _extension_api_version="$(ruby -e'puts Gem.extension_api_version')"
22   gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
23   rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem" \
24       "${pkgdir}/${_gemdir}/extensions/${_platform}/${_extension_api_version}/${_gemname}-${pkgver}/gem_make.out" \
25       "${pkgdir}/${_gemdir}/extensions/${_platform}/${_extension_api_version}/${_gemname}-${pkgver}/mkmf.log" \
26       "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/ext/cairo-gobject/rb-cairo-gobject.o" \
27       "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/ext/cairo-gobject/Makefile"