Revision 1faf2889
Added by Ewoud Kohl van Wijngaarden almost 5 years ago
packages/plugins/rubygem-hammer_cli_foreman_discovery/rubygem-hammer_cli_foreman_discovery.spec | ||
---|---|---|
# template: hammer_plugin
|
||
%{?scl:%scl_package rubygem-%{gem_name}}
|
||
%{!?scl:%global pkg_name %{name}}
|
||
|
||
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}
|
||
|
||
%global gem_name hammer_cli_foreman_discovery
|
||
%global confdir hammer
|
||
%global plugin_name foreman_discovery
|
||
|
||
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}
|
||
%global hammer_confdir %{_root_sysconfdir}/hammer
|
||
|
||
Summary: Foreman discovery commands for Hammer CLI
|
||
Name: %{?scl_prefix}rubygem-%{gem_name}
|
||
Version: 1.0.0
|
||
Release: 3%{?dist}
|
||
Group: Applications/System
|
||
Version: 1.0.1
|
||
Release: 1%{?foremandist}%{?dist}
|
||
Summary: Foreman CLI plugin for managing discovery hosts in foreman
|
||
Group: Development/Languages
|
||
License: GPLv3
|
||
URL: https://github.com/theforeman/hammer-cli-foreman-discovery
|
||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||
|
||
# start specfile generated dependencies
|
||
Requires: %{?scl_prefix_ruby}ruby(release)
|
||
Requires: %{?scl_prefix_ruby}ruby
|
||
Requires: %{?scl_prefix_ruby}ruby(rubygems)
|
||
Requires: %{?scl_prefix}rubygem(hammer_cli_foreman) >= 0.1.2
|
||
BuildRequires: %{?scl_prefix_ruby}ruby(rubygems)
|
||
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
||
BuildRequires: %{?scl_prefix_ruby}ruby(release)
|
||
BuildRequires: %{?scl_prefix_ruby}ruby
|
||
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
|
||
BuildArch: noarch
|
||
Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version}
|
||
%{?scl:Obsoletes: ruby193-rubygem-%{gem_name}}
|
||
%if 0%{?scl:1}
|
||
Obsoletes: rubygem-%{gem_name} < 0.0.2-2
|
||
%endif
|
||
# end specfile generated dependencies
|
||
|
||
%description
|
||
This Hammer CLI plugin contains set of commands for foreman_discovery, a plugin
|
||
to Foreman for bare-metal hardware discovery.
|
||
|
||
|
||
%package doc
|
||
Summary: Documentation for %{pkg_name}
|
||
Group: Documentation
|
||
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
|
||
%{?scl:Obsoletes: ruby193-rubygem-%{gem_name}-doc}
|
||
BuildArch: noarch
|
||
%if 0%{?scl:1}
|
||
Obsoletes: rubygem-%{gem_name}-doc < 0.0.2-2
|
||
%endif
|
||
|
||
%description doc
|
||
Documentation for %{pkg_name}
|
||
Documentation for %{pkg_name}.
|
||
|
||
%prep
|
||
%setup -n %{pkg_name}-%{version} -q -c -T
|
||
%{?scl:scl enable %{scl} - <<EOF}
|
||
%gem_install -n %{SOURCE0}
|
||
%{?scl:scl enable %{scl} - << \EOF}
|
||
gem unpack %{SOURCE0}
|
||
%{?scl:EOF}
|
||
|
||
%install
|
||
mkdir -p %{buildroot}%{_root_sysconfdir}/%{confdir}/cli.modules.d
|
||
install -m 755 .%{gem_instdir}/config/foreman_discovery.yml \
|
||
%{buildroot}%{_root_sysconfdir}/%{confdir}/cli.modules.d/foreman_discovery.yml
|
||
%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}
|
||
cp -pa .%{gem_dir}/* \
|
||
%{buildroot}%{gem_dir}/
|
||
|
||
mkdir -p %{buildroot}%{hammer_confdir}/cli.modules.d
|
||
install -m 0644 .%{gem_instdir}/config/%{plugin_name}.yml \
|
||
%{buildroot}%{hammer_confdir}/cli.modules.d/%{plugin_name}.yml
|
||
|
||
%files
|
||
%dir %{gem_instdir}
|
||
%{gem_instdir}/lib
|
||
%license %{gem_instdir}/LICENSE
|
||
%{gem_libdir}
|
||
%{gem_instdir}/locale
|
||
%config(noreplace) %{_root_sysconfdir}/%{confdir}/cli.modules.d/foreman_discovery.yml
|
||
%exclude %{gem_cache}
|
||
%{gem_spec}
|
||
%doc %{gem_instdir}/LICENSE
|
||
%config(noreplace) %{hammer_confdir}/cli.modules.d/%{plugin_name}.yml
|
||
|
||
%files doc
|
||
%doc %{gem_docdir}
|
||
%doc %{gem_instdir}/config
|
||
%doc %{gem_instdir}/README.md
|
||
%doc %{gem_instdir}/config
|
||
|
||
%changelog
|
||
* Wed Jul 31 2019 Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl> 1.0.1-1
|
||
- Update to 1.0.1-1
|
||
|
||
* Fri Sep 07 2018 Eric D. Helms <ericdhelms@gmail.com> - 1.0.0-3
|
||
- Rebuild for Rails 5.2 and Ruby 2.5
|
||
|
Also available in: Unified diff
Bump rubygem-hammer_cli_foreman_discovery to 1.0.1-1