jcaamano / rpms / vagrant

Forked from rpms/vagrant 3 years ago
Clone
94e6c85
%global bashcompletion_dir %(pkg-config --variable=completionsdir bash-completion 2> /dev/null || :)
94e6c85
%global vagrant_dir %{_datadir}/%{name}
94e6c85
%global vagrant_plugin_dir %{_sharedstatedir}/%{name}
da831a8
4bc2b64
%global vagrant_spec_commit c0dafc996165bf1628b672dd533f1858ff66fe4a
4bc2b64
94e6c85
Name: vagrant
da831a8
Version: 1.6.5
94e6c85
Release: 11%{?dist}
da831a8
Summary: Build and distribute virtualized development environments
da831a8
Group: Development/Languages
da831a8
License: MIT
da831a8
URL: http://vagrantup.com
94e6c85
Source0: https://github.com/mitchellh/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
da831a8
da831a8
# Upstream binstub with adjusted paths, the offical way how to run vagrant
da831a8
Source1: binstub
da831a8
4bc2b64
# The library has no official release yet. But since it is just test
4bc2b64
# dependency, it should be fine to include the source right here.
4bc2b64
Source2: https://github.com/mitchellh/%{name}-spec/archive/%{vagrant_spec_commit}/%{name}-spec-%{vagrant_spec_commit}.tar.gz
0c8a413
94e6c85
Patch0: vagrant-1.6.5-fix-dependencies.patch
cc85749
da831a8
Requires: ruby(release)
da831a8
Requires: ruby(rubygems) >= 1.3.6
7dc35cc
# Explicitly specify MRI, since Vagrant does not work with JRuby ATM.
94e6c85
Requires: ruby
eaf8b60
# rb-inotify should be installed by listen, but this dependency was removed
eaf8b60
# in Fedora's package.
eaf8b60
Requires: rubygem(rb-inotify)
da831a8
Requires: rubygem(bundler) >= 1.5.2
da831a8
Requires: rubygem(hashicorp-checkpoint) >= 0.1.1
da831a8
Requires: rubygem(childprocess) >= 0.5.0
da831a8
Requires: rubygem(erubis) >= 2.7.0
da831a8
Requires: rubygem(i18n) >= 0.6.0
da831a8
Requires: rubygem(listen) >= 2.7.1
da831a8
Requires: rubygem(log4r)
da831a8
Requires: rubygem(net-ssh) >= 2.6.6
da831a8
Requires: rubygem(net-scp) >= 1.1.0
23151d9
Requires: rubygem(nokogiri) >= 1.6
94e6c85
Requires: bsdtar
ff40c83
Requires: curl
da831a8
# libvirt as a default provider
da831a8
#Requires: rubygem(vagrant-libvirt)
da831a8
da831a8
#Requires: polkit-pkla-compat
da831a8
#Requires(pre): shadow-utils
da831a8
0c8a413
BuildRequires: bsdtar
b06fc4b
BuildRequires: rubygem(listen)
b06fc4b
BuildRequires: rubygem(childprocess)
b06fc4b
BuildRequires: rubygem(hashicorp-checkpoint)
b06fc4b
BuildRequires: rubygem(log4r)
b06fc4b
BuildRequires: rubygem(net-ssh)
b06fc4b
BuildRequires: rubygem(net-scp)
b06fc4b
BuildRequires: rubygem(nokogiri)
b06fc4b
BuildRequires: rubygem(i18n)
b06fc4b
BuildRequires: rubygem(erubis)
0c8a413
BuildRequires: rubygem(rb-inotify)
a977236
BuildRequires: rubygem(rspec) < 3
b06fc4b
BuildRequires: rubygem(bundler)
94e6c85
BuildRequires: pkgconfig(bash-completion)
da831a8
BuildArch: noarch
da831a8
da831a8
%description
da831a8
Vagrant is a tool for building and distributing virtualized development
da831a8
environments.
da831a8
da831a8
%package doc
da831a8
Summary: Documentation for %{name}
da831a8
Group: Documentation
da831a8
Requires: %{name} = %{version}-%{release}
da831a8
BuildArch: noarch
da831a8
da831a8
%description doc
da831a8
Documentation for %{name}.
da831a8
da831a8
da831a8
%prep
da831a8
%setup -q
cc85749
94e6c85
%patch0 -p1
da831a8
da831a8
%build
da831a8
da831a8
%install
94e6c85
mkdir -p %{buildroot}%{vagrant_dir}
da831a8
cp -pa ./* \
94e6c85
        %{buildroot}%{vagrant_dir}/
da831a8
da831a8
94e6c85
find %{buildroot}%{vagrant_dir}/bin -type f | xargs chmod a+x
cc85749
94e6c85
# TODO: The .gemspec search for .gitignore. May be the .gemspec should be adjusted.
94e6c85
touch %{buildroot}%{vagrant_dir}/.gitignore
da831a8
94e6c85
# Provide executable similar to upstream:
94e6c85
# https://github.com/mitchellh/vagrant-installers/blob/master/substrate/modules/vagrant_installer/templates/vagrant.erb
94e6c85
install -D -m 755 %{SOURCE1} %{buildroot}%{_bindir}/vagrant
94e6c85
sed -i 's|@vagrant_dir@|%{vagrant_dir}|' %{buildroot}%{_bindir}/vagrant
94e6c85
sed -i 's|@vagrant_plugin_dir@|%{vagrant_plugin_dir}|' %{buildroot}%{_bindir}/vagrant
da831a8
da831a8
# auto-completion
94e6c85
install -D -m 0644 %{buildroot}%{vagrant_dir}/contrib/bash/completion.sh \
94e6c85
  %{buildroot}%{bashcompletion_dir}/%{name}
da831a8
da831a8
# create the global home dir
94e6c85
install -d -m 755 %{buildroot}%{_sharedstatedir}/%{name}
da831a8
0c8a413
%check
0c8a413
# Unpack the vagran-spec and adjust the directory name.
0c8a413
tar xvzf %{S:2} -C ..
4bc2b64
mv ../vagrant-spec{-%{vagrant_spec_commit},}
0c8a413
0c8a413
# Remove the git reference, which is useless in our case.
0c8a413
sed -i '/git/ s/^/#/' ../vagrant-spec/vagrant-spec.gemspec
0c8a413
0c8a413
# TODO: winrm is not in Fedora yet.
0c8a413
rm -rf test/unit/plugins/communicators/winrm
0c8a413
sed -i '/it "eager loads WinRM" do/,/^      end$/ s/^/#/' test/unit/vagrant/machine_test.rb
0c8a413
sed -i '/it "should return the specified communicator if given" do/,/^    end$/ s/^/#/' test/unit/vagrant/machine_test.rb
0c8a413
0c8a413
bundle --local
0c8a413
0c8a413
# Test suite must be executed in order.
0c8a413
ruby -rbundler/setup -I.:lib -e 'Dir.glob("test/unit/**/*_test.rb").sort.each &method(:require)'
da831a8
da831a8
%pre
da831a8
getent group vagrant >/dev/null || groupadd -r vagrant
da831a8
 
da831a8
%files
94e6c85
%{_datadir}/%{name}
94e6c85
%{_bindir}/%{name}
94e6c85
%{bashcompletion_dir}/%{name}
94e6c85
%dir %{_sharedstatedir}/%{name}
94e6c85
%ghost %{_sharedstatedir}/%{name}/plugins.json
da831a8
da831a8
%files doc
da831a8
da831a8
%changelog
94e6c85
* Wed Oct 22 2014 Vít Ondruch <vondruch@redhat.com> - 1.6.5-11
94e6c85
- Make vagrant non-rubygem package.
94e6c85
da831a8
* Tue Oct 14 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-10
da831a8
- rebuilt
da831a8
da831a8
* Tue Oct 07 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-9
da831a8
- Register vagrant-libvirt automatically
da831a8
da831a8
* Tue Sep 30 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-8
da831a8
- Set libvirt as a default provider
da831a8
da831a8
* Tue Sep 23 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-7
da831a8
- Require core dependencies for vagrant-libvirt beforehand
da831a8
da831a8
* Mon Sep 22 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-6
da831a8
- Fix SSL cert path for the downloader
da831a8
da831a8
* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-5
da831a8
- rebuilt
da831a8
da831a8
* Tue Sep 16 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-4
da831a8
- rebuilt
da831a8
da831a8
* Sat Sep 13 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-3
da831a8
- Include libvirt requires for now
da831a8
da831a8
* Wed Sep 10 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-2
da831a8
- Add missing deps on Bundler and hashicorp-checkpoint
da831a8
da831a8
* Mon Sep 08 2014 Josef Stribny <jstribny@redhat.com> - 1.6.5-1
da831a8
* Update to 1.6.5
da831a8
da831a8
* Mon Sep 08 2014 Josef Stribny <jstribny@redhat.com> - 1.6.3-2
da831a8
- Clean up
da831a8
- Update to 1.6.3
da831a8
da831a8
* Fri Oct 18 2013  <adrahon@redhat.com> - 1.3.3-1.1
da831a8
- Misc bug fixes, no separate package for docs, /etc/vagrant management
da831a8
da831a8
* Tue Sep 24 2013  <adrahon@redhat.com> - 1.3.3-1
da831a8
- Initial package