# $Id: PKGBUILD 117927 2014-08-26 18:41:41Z jsteel $
# Maintainer: Jonathan Steel <jsteel at aur.archlinux.org>
# Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr>
# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
# Contributor: Thomas S Hatch <thatch45 (at) Gmail.com>
# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com>
# Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com>

pkgname=facter
pkgver=2.2.0
pkgrel=1
pkgdesc="Collect and display system facts"
arch=('any')
url="http://puppetlabs.com/facter"
license=('APACHE')
depends=('ruby' 'inetutils' 'net-tools')
source=(http://downloads.puppetlabs.com/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('60e24b947ef4a8a842998be54544f02d')

package() {
  cd "$srcdir"/$pkgname-$pkgver

  ruby install.rb --destdir="$pkgdir"/ --sitelibdir="$( ruby -e \
    'puts RbConfig::CONFIG["vendorlibdir"]' )"

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
