1 Summary: Vagrant Plugin to add KVM provider to Vagrant
6 Group: Applications/Emulators
7 Source0: https://github.com/adrahon/vagrant-kvm/tarball/master?/%{name}-44e7eb1.tgz
8 # Source0-md5: ea30e020c8fef19c6100738c71e8dec0
9 URL: https://github.com/adrahon/vagrant-kvm
10 BuildRequires: rpm-rubyprov
11 BuildRequires: rpmbuild(macros) >= 1.656
12 BuildRequires: ruby-rubygems
13 Requires: ruby-libvirt >= 0.4.0
14 Requires: ruby-nokogiri >= 1.5.6
15 Requires: ruby-rubygems >= 1.3.6
16 Requires: vagrant >= 1.1
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define vagrantdir %{_datadir}/vagrant
21 %define gem_dir %{_datadir}/ruby/gems/%{ruby_version}
22 %define spec_dir %{gem_dir}/specifications
24 # disable, we're not packaging gems (yet?)
25 %define __ruby_requires %{nil}
28 A Vagrant 1.1+ plugin that adds a KVM provider to Vagrant, allowing
29 Vagrant to control and provision KVM/QEMU VM.
33 mv adrahon-vagrant-kvm-*/{.??*,*} .
36 # make gem to get cleaned up .gemspec
37 gem build vagrant-kvm.gemspec
38 gem install --local --install-dir=tmp vagrant-kvm-%{version}.gem --force --no-rdoc --no-ri
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{spec_dir}}
43 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
44 cp -p tmp/specifications/vagrant-kvm-%{version}.gemspec $RPM_BUILD_ROOT%{spec_dir}
47 rm -rf $RPM_BUILD_ROOT
50 %banner -o -e %{name} <<-'EOF'
52 To use this Vagrant plugin, you need to link .gemspec to vagrant specifications dir:
53 $ install -d ~/.vagrant.d/gems/specifications
54 $ ln -s %{spec_dir}/vagrant-kvm-%{version}.gemspec ~/.vagrant.d/gems/specifications
56 and add to plugins.json:
57 echo '{"installed":["vagrant-kvm"]}' >> ~/.vagrant.d/plugins.json
59 it should became available:
65 %defattr(644,root,root,755)
66 %doc README.md CHANGELOG.md LICENSE
67 %{ruby_vendorlibdir}/vagrant-kvm.rb
68 %{ruby_vendorlibdir}/vagrant-kvm