]> git.pld-linux.org Git - packages/hiera.git/commitdiff
up to 1.3.4, package gemspec auto/th/hiera-1.3.4-1
authorElan Ruusamäe <glen@delfi.ee>
Mon, 10 Aug 2015 21:08:34 +0000 (00:08 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 10 Aug 2015 21:13:37 +0000 (00:13 +0300)
hiera.spec
hiera.yaml

index 828be54c953d09f80a42f6027aff4267086dd8df..d19f688b6f3ac512afe5bb7f74c1123c74ac1dde 100644 (file)
@@ -4,17 +4,21 @@
 
 Summary:       A simple hierarchical database supporting plugin data sources
 Name:          hiera
-Version:       1.0.0
+# http://docs.puppetlabs.com/hiera/
+# Hiera 3.0 is included with open source Puppet versions 4.2 and up.
+# Hiera 1.0 is compatible with Puppet 3.x and is included in Puppet Enterprise 3.x.
+Version:       1.3.4
 Release:       1
 License:       Apache v2.0
 Group:         Applications/Databases
-Source0:       http://downloads.puppetlabs.com/hiera/%{name}-%{version}.tar.gz
-# We use a copy of misreleased 'newer' version of 1.0.0
-# http://projects.puppetlabs.com/issues/16621
+Source0:       http://rubygems.org/downloads/%{name}-%{version}.gem
+# Source0-md5: 9d83ce8a56cf74ae93bc55ce878da9f3
+# Copied from http://downloads.puppetlabs.com/hiera/%{name}-%{version}.tar.gz
+# tarball ext/hiera.yaml, as ext/ dir is not included in gem, but we want gem for .gemspec
 Source1:       %{name}.yaml
 URL:           http://projects.puppetlabs.com/projects/hiera/
-BuildRequires: rpmbuild(macros) >= 1.656
 BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.656
 %if %{with tests}
 BuildRequires: ruby-mocha
 BuildRequires: ruby-rspec
@@ -27,29 +31,37 @@ A simple hierarchical database supporting plugin data sources.
 
 %prep
 %setup -q
-cp -p %{SOURCE1} hiera.yaml
+install -d ext
+cp -p %{SOURCE1} ext/hiera.yaml
 
 %build
+# write .gemspec
+%__gem_helper spec
+
+# why pure? just json will do
+%{__sed} -i -e 's/json_pure/json/' *.gemspec
+
 %if %{with tests}
 ruby spec/spec_helper.rb
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{ruby_vendorlibdir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{ruby_vendorlibdir},%{ruby_specdir},%{_var}/lib/hiera}
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
-cp -p hiera.yaml $RPM_BUILD_ROOT%{_sysconfdir}
-install -d $RPM_BUILD_ROOT%{_var}/lib/hiera
+cp -p ext/hiera.yaml $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md CHANGELOG LICENSE
+%doc README.md LICENSE
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hiera.yaml
 %attr(755,root,root) %{_bindir}/hiera
 %{ruby_vendorlibdir}/hiera.rb
 %{ruby_vendorlibdir}/hiera
+%{ruby_specdir}/%{name}-%{version}.gemspec
 %dir %{_var}/lib/hiera
index 4f7e782fcbad3b4bb5b35ad111594b6176443190..b0ea22a822203bee13881cfbe6859f957c7e1a69 100644 (file)
@@ -1,13 +1,15 @@
 ---
-:backend:
+:backends:
   - yaml
 :hierarchy:
   - defaults
-  - %{certname}
-  - %{environment}
+  - "%{clientcert}"
+  - "%{environment}"
   - global
 
 :yaml:
-# datadir is empty here, so hiera uses its defaults, /var/lib/hiera
-# When specifying a datadir, make sure the path of the datadir exists
+# 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:
This page took 0.096881 seconds and 4 git commands to generate.