Blob Blame History Raw
%global vagrant_plugin_name vagrant-hostmanager

Name: vagrant-hostmanager
Version: 1.7.1
Release: 1%{?dist}
Summary: Vagrant plugin to manage /etc/hosts
License: MIT
URL: https://github.com/smdahlen/vagrant-hostmanager
Source0: https://rubygems.org/gems/%{vagrant_plugin_name}-%{version}.gem
Requires(posttrans): vagrant
Requires(preun): vagrant
Requires: vagrant
BuildRequires: ruby(release)
BuildRequires: rubygems-devel 
BuildRequires: ruby 
BuildRequires: vagrant 
BuildArch: noarch
Provides: vagrant(vagrant-hostmanager) = %{version}


%description
vagrant-hostmanager is a Vagrant plugin that manages the /etc/hosts file
on guest machines (and optionally the host). Its goal is to enable
resolution of multi-machine environments deployed with a cloud provider
where IP addresses are not known in advance.


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


%description doc
Documentation for %{name}.


%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n  %{vagrant_plugin_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{vagrant_plugin_name}.gemspec


%build
gem build %{name}.gemspec
%vagrant_plugin_install


%install
# We don't ship the test suite
rm -rf .%{vagrant_plugin_dir}/gems/%{vagrant_plugin_name}-%{version}/test

mkdir -p %{buildroot}%{vagrant_plugin_dir}
cp -a .%{vagrant_plugin_dir}/* \
       %{buildroot}%{vagrant_plugin_dir}/


%posttrans
%vagrant_plugin_register %{name}


%preun
%vagrant_plugin_unregister %{name}


%files
%license %{vagrant_plugin_instdir}/LICENSE.txt
%exclude %{vagrant_plugin_cache}
%dir %{vagrant_plugin_instdir}
%exclude %{vagrant_plugin_instdir}/.gitignore
%{vagrant_plugin_instdir}/locales
%{vagrant_plugin_libdir}
%{vagrant_plugin_spec}


%files doc
%doc %{vagrant_plugin_instdir}/CHANGELOG.md
%doc %{vagrant_plugin_instdir}/README.md
%{vagrant_plugin_instdir}/Gemfile
%{vagrant_plugin_instdir}/Rakefile
%{vagrant_plugin_instdir}/%{vagrant_plugin_name}.gemspec


%changelog
* Fri Jan 29 2016 Randy Barlow <rbarlow@redhat.com> - 1.7.1-1
- Update to 1.7.1, a bugfix release.
- Remove the empty vagrant_plugin_docdir, as upstream stopped distributing it.

* Wed Dec 30 2015 Randy Barlow <randy@electronsweatshop.com> - 1.7.0-1
- Update to version 1.7.0.

* Tue Dec 15 2015 Randy Barlow <randy@electronsweatshop.com> - 1.6.1-2
- 1291123 - Add a -doc subpackage.

* Fri Nov 27 2015 Randy Barlow <randy@electronsweatshop.com> - 1.6.1-1
- Initial release.