Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

ruby-hiera pkgbuild

By: a guest on Apr 4th, 2013  |  syntax: None  |  size: 1.06 KB  |  views: 29  |  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. # updated ruby-hiera pkgbuild for 1.2.0
  2.  
  3. _gemname=hiera
  4. pkgname=ruby-$_gemname
  5. pkgver=1.2.0
  6. pkgrel=1
  7. pkgdesc="A pluggable data store for hierarcical data."
  8. arch=(any)
  9. url='http://projects.puppetlabs.com/projects/hiera/'
  10. license=('MIT')
  11. depends=('ruby')
  12. makedepends=('rubygems')
  13. source=(
  14.         "http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"
  15.         'hiera.yaml')
  16. noextract=($_gemname-$pkgver.gem)
  17.  
  18. package() {
  19.   cd "$srcdir"
  20.   # _gemdir is defined inside package() because if ruby[gems] is not installed on
  21.   # the system, makepkg will exit with an error when sourcing the PKGBUILD.
  22.   local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
  23.  
  24.   gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
  25.     -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem"
  26.  
  27.   # Create hiera default directory
  28.   install -d $pkgdir/var/lib/hiera
  29.  
  30.   # Create hiera default configuration
  31.   install -d $pkgdir/etc
  32.   install -m 644 $srcdir/hiera.yaml $pkgdir/etc/
  33. }
  34. md5sums=('2d97332219c7fffec16cee88904227e3'
  35.          '3c2f95791009f2113f5d3eb54a6577a8')
clone this paste RAW Paste Data