Want more features on Pastebin? Sign Up, it's FREE!
Guest

ruby-facter pkgbuild

By: a guest on Apr 15th, 2013  |  syntax: Bash  |  size: 0.99 KB  |  views: 28  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Jochen Schalanda <jochen+aur@schalanda.name>
  2. _gemname=facter
  3. pkgname=ruby-$_gemname
  4. #_rc=2
  5. #_pkgver=1.7.0
  6. #pkgver=${_pkgver}.rc${_rc}
  7. pkgver=1.7.0
  8. pkgrel=1
  9. pkgdesc="A library for collecting facts about your system."
  10. arch=(any)
  11. url="http://puppetlabs.com/projects/facter/"
  12. license=('MIT')
  13. depends=('ruby')
  14. makedepends=('rubygems')
  15. optdepends=('net-tools: for ifconfig-based facts')
  16. source=(http://gems.rubyforge.org/gems/$_gemname-${pkgver//_/-}.gem)
  17. conflicts=('facter')
  18. provides=('facter')
  19. noextract=($_gemname-${pkgver//_/-}.gem)
  20.  
  21. package() {
  22.   cd "$srcdir"
  23.   # _gemdir is defined inside package() because if ruby[gems] is not installed on
  24.   # the system, makepkg will exit with an error when sourcing the PKGBUILD.
  25.   local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
  26.  
  27.   gem install --no-user-install --ignore-dependencies -i "${pkgdir}${_gemdir}" \
  28.     -n "${pkgdir}/usr/bin" "${_gemname}-${pkgver//_/-}.gem"
  29. }
  30. md5sums=('7d5efb4904faa90f5a7285dadb764c03')
clone this paste RAW Paste Data