summaryrefslogtreecommitdiff
path: root/pcr/ruby-hiera
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-11-23 16:00:21 -0200
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2012-11-23 16:00:21 -0200
commit13e7da299d6c1d313b32309f5737d887212b7d4c (patch)
treed4f484d0a730e8f66f3412d1535ff561adf7dea9 /pcr/ruby-hiera
parente0755bc7fa7cd05b992a9988a9d38587e169f42d (diff)
parente61f24169547faea84a6b813212bac030feaacd1 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'pcr/ruby-hiera')
-rw-r--r--pcr/ruby-hiera/PKGBUILD34
-rw-r--r--pcr/ruby-hiera/hiera.yaml21
2 files changed, 55 insertions, 0 deletions
diff --git a/pcr/ruby-hiera/PKGBUILD b/pcr/ruby-hiera/PKGBUILD
new file mode 100644
index 000000000..c4d51fe44
--- /dev/null
+++ b/pcr/ruby-hiera/PKGBUILD
@@ -0,0 +1,34 @@
+# Contributor: Jochen Schalanda <jochen+aur@schalanda.name>
+# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io>
+
+_gemname=hiera
+pkgname=ruby-$_gemname
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="A pluggable data store for hierarcical data."
+arch=(any)
+url='http://projects.puppetlabs.com/projects/hiera/'
+license=('MIT')
+depends=('ruby')
+makedepends=('rubygems')
+source=(
+ "http://gems.rubyforge.org/gems/$_gemname-$pkgver.gem"
+ 'hiera.yaml')
+noextract=($_gemname-$pkgver.gem)
+
+package() {
+ cd "$srcdir"
+ # _gemdir is defined inside package() because if ruby[gems] is not installed on
+ # the system, makepkg will exit with an error when sourcing the PKGBUILD.
+ local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
+
+ gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
+ -n "$pkgdir/usr/bin" "$_gemname-$pkgver.gem"
+
+ # Create hiera default directory
+ install -d $pkgdir/var/lib/hiera
+
+ # Create hiera default configuration
+ install -d $pkgdir/etc
+ install -m 644 $srcdir/hiera.yaml $pkgdir/etc/
+}
diff --git a/pcr/ruby-hiera/hiera.yaml b/pcr/ruby-hiera/hiera.yaml
new file mode 100644
index 000000000..cd0be3fec
--- /dev/null
+++ b/pcr/ruby-hiera/hiera.yaml
@@ -0,0 +1,21 @@
+---
+:backend:
+ - yaml
+ - json
+:hierarchy:
+ - defaults
+ - global
+
+:yaml:
+# datadir is empty here, so hiera uses its defaults:
+# - /var/lib/hiera on *nix
+# - %CommonAppData%\PuppetLabs\hiera\var on Windows
+# When specifying a datadir, make sure the directory exists.
+ :datadir:
+
+:json:
+# datadir is empty here, so hiera uses its defaults:
+# - /var/lib/hiera on *nix
+# - %CommonAppData%\PuppetLabs\hiera\var on Windows
+# When specifying a datadir, make sure the directory exists.
+ :datadir: