%global gem_name setup_oob %global _description %{expand: Setup OOB is a utility for configuring out-of-band management systems from within the running (Linux) OS. It is built to be highly modular and easy to add support for new types of OOB devices. As of current writing it supports SuperMicro SMC systems and Dell iDRAC systems. It is specifically designed to be easy to run from a Configuration Management system such as Chef, and thus has a 'check' mode to enable idempotent behavior. Setup OOB attempts to do as much as possible with the generic ipmitool, and falls back to vendor-specific tools only where necessary.} Name: rubygem-%{gem_name} Version: 0.0.1 Release: %autorelease Summary: Setup OOB systems from Linux License: ASL 2.0 URL: https://github.com/vicariousinc/setup-oob Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # PR#4: Use system ruby in shebang Patch0: %{url}/pull/4.patch#/Use-system-ruby-in-shebang.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: rubygem-mixlib-shellout BuildRequires: rubygem-ipaddress BuildRequires: ruby >= 2.5.0 BuildArch: noarch %description %{_description} %package -n setup-oob Summary: %{summary} Requires: %{name} = %{version}-%{release} Requires: ipmitool Requires: rubygem-mixlib-shellout Requires: rubygem-ipaddress %description -n setup-oob %{_description} %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name}. %prep %autosetup -n %{gem_name}-%{version} -p1 %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* %{buildroot}%{_bindir}/ %check pushd .%{gem_instdir} ./bin/setup-oob --help popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files -n setup-oob %{_bindir}/setup-oob %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %files doc %doc %{gem_docdir} %changelog %autochangelog