|
%{?scl:%scl_package rubygem-%{gem_name}}
|
|
%{!?scl:%global pkg_name %{name}}
|
|
|
|
%global gem_name redhat_access
|
|
%global plugin_name redhat_access
|
|
|
|
Name: %{?scl_prefix}rubygem-%{gem_name}
|
|
Version: 2.1.5
|
|
Release: 1%{?foremandist}%{?dist}
|
|
Summary: Plugin to add Redhat Access to Foreman
|
|
Group: Applications/Systems
|
|
License: GPLv3+
|
|
URL: https://github.com/redhataccess/foreman-plugin
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
Requires: foreman >= 1.18.0
|
|
Requires: %{?scl_prefix_ruby}ruby(release)
|
|
Requires: %{?scl_prefix_ruby}ruby
|
|
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
|
Requires: %{?scl_prefix}rubygem(redhat_access_lib) >= 1.1.0
|
|
Requires: %{?scl_prefix}rubygem(angular-rails-templates) >= 0.0.4
|
|
Requires: %{?scl_prefix}rubygem(katello) >= 3.4.0
|
|
BuildRequires: foreman-assets
|
|
BuildRequires: foreman-plugin >= 1.18.0
|
|
BuildRequires: %{?scl_prefix}rubygem(foreman-tasks)
|
|
BuildRequires: %{?scl_prefix}rubygem(redhat_access_lib) >= 1.1.0
|
|
BuildRequires: %{?scl_prefix}rubygem(angular-rails-templates) >= 0.0.4
|
|
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
|
BuildRequires: %{?scl_prefix_ruby}ruby
|
|
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
|
BuildRequires: %{?scl_prefix}rubygem(redhat_access_lib) >= 1.0.1
|
|
BuildArch: noarch
|
|
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
|
Provides: foreman-plugin-%{plugin_name}
|
|
Provides: %{?scl_prefix}rubygem-foreman-%{gem_name} = %{version}
|
|
Provides: %{?scl_prefix}rubygem(foreman-%{gem_name}) = %{version}
|
|
Obsoletes: %{?scl_prefix}rubygem-foreman-%{gem_name} < %{version}
|
|
|
|
%description
|
|
This plugin adds Red Hat Access knowledge base search, case management and
|
|
diagnostics to Foreman.
|
|
|
|
|
|
%package doc
|
|
Summary: Documentation for %{pkg_name}
|
|
Group: Documentation
|
|
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Documentation for %{pkg_name}.
|
|
|
|
%prep
|
|
%{?scl:scl enable %{scl} - << \EOF}
|
|
gem unpack %{SOURCE0}
|
|
%{?scl:EOF}
|
|
|
|
%setup -q -D -T -n %{gem_name}-%{version}
|
|
|
|
%{?scl:scl enable %{scl} - << \EOF}
|
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
|
%{?scl:EOF}
|
|
|
|
%build
|
|
# Create the gem as gem install only works on a gem file
|
|
%{?scl:scl enable %{scl} - << \EOF}
|
|
gem build %{gem_name}.gemspec
|
|
%{?scl:EOF}
|
|
|
|
# %%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
|
|
%{?scl:scl enable %{scl} - << \EOF}
|
|
%gem_install
|
|
%{?scl:EOF}
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
mkdir -p %{buildroot}%{foreman_bundlerd_dir}
|
|
mkdir -p %{buildroot}/etc/redhat_access
|
|
|
|
cp -pa .%{gem_dir}/* \
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
# Copy config file
|
|
cp -pa $RPM_BUILD_DIR/%{gem_name}-%{version}/config/config.yml.example %{buildroot}/etc/redhat_access/config.yml
|
|
|
|
%foreman_bundlerd_file
|
|
%foreman_precompile_plugin -s
|
|
|
|
%files
|
|
%dir %{gem_instdir}
|
|
%license %{gem_instdir}/LICENSE.txt
|
|
%{gem_instdir}/app
|
|
%{gem_instdir}/ca
|
|
%{gem_instdir}/config
|
|
%{gem_instdir}/db
|
|
%{gem_libdir}
|
|
%{gem_instdir}/locale
|
|
%{gem_instdir}/public
|
|
%{gem_instdir}/script
|
|
%{gem_instdir}/vendor
|
|
%exclude %{gem_cache}
|
|
%{gem_spec}
|
|
%{foreman_bundlerd_plugin}
|
|
|
|
%config(noreplace) /etc/redhat_access/config.yml
|
|
|
|
%files doc
|
|
%doc %{gem_docdir}
|
|
%{gem_instdir}/Gemfile
|
|
%doc %{gem_instdir}/README.rdoc
|
|
%{gem_instdir}/Rakefile
|
|
%{gem_instdir}/redhat_access.gemspec
|
|
%{gem_instdir}/test
|
|
|
|
%posttrans
|
|
%{foreman_db_migrate}
|
|
%{foreman_db_seed}
|
|
%{foreman_apipie_cache}
|
|
%{foreman_restart}
|
|
exit 0
|
|
|
|
%changelog
|
|
* Tue Jun 12 2018 Marek Hulan <mhulan@redhat.com> 2.1.5-1
|
|
- Update to 2.1.5
|
|
|
|
* Tue Apr 03 2018 Marek Hulan <mhulan@redhat.com>
|
|
- Add rubygem-redhat_access generated by gem2rpm using the foreman_plugin template
|
|
|