]> git.pld-linux.org Git - packages/ruby-ohai.git/blobdiff - ruby-ohai.spec
net/dhcp no longer required in ohai code
[packages/ruby-ohai.git] / ruby-ohai.spec
index e7c91d6b8fe61a9265fcf42b75191406d4ae8580..a8f323e122e2a525d8fddd434c7710524e0c24c1 100644 (file)
@@ -7,14 +7,13 @@
 %define pkgname ohai
 Summary:       Profiles your system and emits JSON
 Name:          ruby-%{pkgname}
-Version:       7.6.0
-Release:       1
+Version:       8.16.0
+Release:       0.1
 License:       Apache v2.0
 Group:         Development/Languages
 Source0:       https://github.com/opscode/ohai/archive/%{version}/%{pkgname}-%{version}.tar.gz
-# Source0-md5: b28339ec7f835a2ed4ec0f876178fb14
+# Source0-md5: 7a2182e562bab7dcc48e0b68e07daf92
 Patch1:                platform-pld.patch
-Patch2:                soft-net-dhcp.patch
 URL:           http://docs.getchef.com/ohai.html
 BuildRequires: rpm-rubyprov
 BuildRequires: rpmbuild(macros) >= 1.665
@@ -35,6 +34,7 @@ BuildRequires:        ruby-systemu >= 2.6.4
 Requires:      iproute2
 Requires:      lsb-release
 Requires:      mount
+Requires:      ruby(abi) >= 2.0
 Requires:      ruby-ffi >= 1.9
 Requires:      ruby-ffi-yajl >= 1.1
 Requires:      ruby-ipaddress
@@ -64,7 +64,6 @@ This package contains documentation for %{name}.
 %prep
 %setup -q -n ohai-%{version}
 %patch1 -p1
-%patch2 -p1
 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
 
 # don't need shellout 2.0 yet, but 2.0 is ok
@@ -73,6 +72,7 @@ This package contains documentation for %{name}.
 %{__sed} -i -e '/net-dhcp/d' %{pkgname}.gemspec
 # platform specific and optional
 %{__sed} -i -e '/wmi-lite/d' %{pkgname}.gemspec
+%{__sed} -i -e '/plist/d' %{pkgname}.gemspec
 # dev dep
 %{__sed} -i -e '/rake/d' %{pkgname}.gemspec
 
@@ -80,13 +80,15 @@ This package contains documentation for %{name}.
 rm spec/unit/plugins/darwin/system_profiler_spec.rb
 
 # can't figure how to fix -r rubygems does not help
-# ohai-6.16.0/spec/unit/plugins/ruby_spec.rb:52:in `block in <top (required)>': uninitialized cons tant Gem (NameError)
+# ohai-6.16.0/spec/unit/plugins/ruby_spec.rb:52:in `block in <top (required)>': uninitialized constant Gem (NameError)
 rm spec/unit/plugins/ruby_spec.rb
 
 %build
-rake -Ilib gem
-%{__tar} -xmf pkg/ohai-%{version}*.gem
-%__gem_helper spec
+# make gemspec self-contained
+ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec"))
+       File.open("%{pkgname}-%{version}.gemspec", "w") do |file|
+       file.puts spec.to_ruby_for_cache
+end'
 
 %if %{with tests}
 # Occasionally fails with "undefined method `rfc2822' for nil:NilClass" during
This page took 0.070639 seconds and 4 git commands to generate.