Ruby Gem Package Guidelines
From ArchWiki
Contents |
Package Naming
For libraries, use "ruby-gemname". For applications, use the program name. In either case, the pkgname should be entirely lowercase
Examples
For examples, please see github-gem ruby-json_pure ruby-hpricot
Example PKGBUILD
# Contributor: YourName <YourEmail AT example DOT com> pkgname=ruby-GEMNAME # All lowercase pkgver=GEMVERSION pkgrel=1 pkgdesc="Ruby gem FooBar which implements BazQuux" arch=(any) url="" license=() depends=(ruby) # Gem may depend on other gems as well (you can get dependency information from 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 barf 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:
Automation
Abhishek Dasgupta wrote gem2arch to aid in automating the process of creating a ruby gem PKGBUILD. Make sure to manually check the PKGBUILD after generation.