# Generated from environment_information-1.3.11.gem by gem2rpm -*- rpm-spec -*-
%global gem_name environment_information

Name: rubygem-%{gem_name}
Version: 1.3.11
Release: 1%{?dist}
Summary: The gem environment_information is able to provide information about the computer host system, in particular on Linux systems, if ruby is available on that computer. Commonly used programs will be queried for their current version number (and whether they exist) on the target computer. If these programs do happen to exist then the corresponding version will be displayed, on the commandline.  This is somewhat similar to the "Linux from Scratch" project, which uses a shell script to display the version of many commonly used programs. As I prefer ruby over shell scripts, I wrote this somewhat equivalent project.  For more information and documentation about this project, consider looking at the homepage of this gem, at  https://rubygems.org/gems/environment_information  and look at the documentation on the bottom right side, called "Documentation"
License: GPL-2.0
URL: http://rubygems.org/gems/environment_information
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel >= 3.1.2
BuildRequires: ruby >= 2.7.0
BuildArch: noarch

%description
The gem environment_information is able to provide information about the
computer host system, in particular on Linux systems, if ruby is available
on that computer. Commonly used programs will be queried for their current
version number (and whether they exist) on the target computer. If these
programs do happen to exist then the corresponding version will be
displayed, on the commandline.
This is somewhat similar to the "Linux from Scratch" project, which uses
a shell script to display the version of many commonly used programs.
As I prefer ruby over shell scripts, I wrote this somewhat equivalent
project.
For more information and documentation about this project, consider
looking at the homepage of this gem, at
https://rubygems.org/gems/environment_information
and look at the documentation on the bottom right side,
called "Documentation".
.


%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version}

%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}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%check
pushd .%{gem_instdir}
# Run the test suite.
popd

%files
%dir %{gem_instdir}
%{_bindir}/fast_envi
%{_bindir}/envi
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.md
%doc %{gem_instdir}/doc
%{gem_instdir}/environment_information.gemspec
%{gem_instdir}/test

%changelog
* Fri Feb 21 2020 mockbuilder - 1.3.11-1
- Initial package