# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# See http://wiki.archlinux.org/index.php/Ruby_Gem_Package_Guidelines for more
# information on Ruby Gem packaging.

# Contributor: YourName <YourEmail AT example DOT com>
pkgname=ruby-GEMNAME
pkgver=VERSION
pkgrel=1
pkgdesc=""
arch=(any)
url=""
license=('GPL')
depends=(ruby) # Full dependency information is available in the yaml specification
makedepends=(rubygems)
source=(http://gems.rubyforge.org/gems/GEMNAME-$pkgver.gem)
noextract=(GEMNAME-$pkgver.gem)
md5sums=()

build() {
  cd $srcdir
  # _gemdir is defined inside build() because if ruby[gems] is not installed on the system
  # makepkg will exit with an error when sourcing the PKGBUILD
  local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"

  gem install --ignore-dependencies -i "$pkgdir$_gemdir" GEMNAME-$pkgver.gem
}

# vim:set ts=2 sw=2 et:
