Difference between revisions of "Ruby Gem package guidelines"

From ArchWiki
Jump to: navigation, search
(Automation)
(Example PKGBUILD added)
Line 10: Line 10:
 
==Examples==
 
==Examples==
 
For examples, please see [http://aur.archlinux.org/packages.php?ID=24484 github-gem] [http://aur.archlinux.org/packages.php?ID=24483 ruby-json_pure] [http://aur.archlinux.org/packages.php?ID=17121 ruby-hpricot]
 
For examples, please see [http://aur.archlinux.org/packages.php?ID=24484 github-gem] [http://aur.archlinux.org/packages.php?ID=24483 ruby-json_pure] [http://aur.archlinux.org/packages.php?ID=17121 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)
 +
  makedepends=(rubygems)
 +
  source=(GEMNAME-$pkgver.gem)
 +
  noextract=(GEMNAME-$pkgver.gem)
 +
  md5sums=()
 +
 
 +
  build() {
 +
    cd $srcdir
 +
    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==
 
==Automation==
 
Abhishek Dasgupta wrote [http://github.com/abhidg/gem2arch/ gem2arch] to aid in automating the process of creating a ruby gem PKGBUILD. Make sure to manually check the PKGBUILD after generation.
 
Abhishek Dasgupta wrote [http://github.com/abhidg/gem2arch/ gem2arch] to aid in automating the process of creating a ruby gem PKGBUILD. Make sure to manually check the PKGBUILD after generation.

Revision as of 13:50, 21 March 2009

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Ruby Gem package guidelines#)

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)
 makedepends=(rubygems)
 source=(GEMNAME-$pkgver.gem)
 noextract=(GEMNAME-$pkgver.gem)
 md5sums=()
 
 build() {
   cd $srcdir
   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.