PKGBUILD-rubygem.proto 1.05 KB
Newer Older
Allan McRae's avatar
Allan McRae committed
1
2
3
4
5
6
7
8
# 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.

9
# Maintainer: Your Name <youremail@domain.com>
Allan McRae's avatar
Allan McRae committed
10
11
12
13
14
15
16
17
18
19
20
21
22
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=()

23
package() {
matt mooney's avatar
matt mooney committed
24
  cd "$srcdir"
25
  # _gemdir is defined inside package() because if ruby[gems] is not installed on the system
Allan McRae's avatar
Allan McRae committed
26
27
28
  # makepkg will exit with an error when sourcing the PKGBUILD
  local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"

matt mooney's avatar
matt mooney committed
29
  gem install --ignore-dependencies -i "$pkgdir$_gemdir" "GEMNAME-$pkgver.gem"
Allan McRae's avatar
Allan McRae committed
30
31
32
}

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