]> git.pld-linux.org Git - SPECS.git/blob - vagrant-kvm.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / vagrant-kvm.spec
1 Summary:        Vagrant Plugin to add KVM provider to Vagrant
2 Name:           vagrant-kvm
3 Version:        0.1.1
4 Release:        0.10
5 License:        MIT
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
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         vagrantdir      %{_datadir}/vagrant
21 %define         gem_dir         %{_datadir}/ruby/gems/%{ruby_version}
22 %define         spec_dir        %{gem_dir}/specifications
23
24 # disable, we're not packaging gems (yet?)
25 %define         __ruby_requires %{nil}
26
27 %description
28 A Vagrant 1.1+ plugin that adds a KVM provider to Vagrant, allowing
29 Vagrant to control and provision KVM/QEMU VM.
30
31 %prep
32 %setup -qc
33 mv adrahon-vagrant-kvm-*/{.??*,*} .
34
35 %build
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
39
40 %install
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}
45
46 %clean
47 rm -rf $RPM_BUILD_ROOT
48
49 %post
50 %banner -o -e %{name} <<-'EOF'
51
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
55
56 and add to plugins.json:
57 echo '{"installed":["vagrant-kvm"]}' >> ~/.vagrant.d/plugins.json
58
59 it should became available:
60 $ vagrant plugin list
61
62 EOF
63
64 %files
65 %defattr(644,root,root,755)
66 %doc README.md CHANGELOG.md LICENSE
67 %{ruby_vendorlibdir}/vagrant-kvm.rb
68 %{ruby_vendorlibdir}/vagrant-kvm
69 %{spec_dir}/*.gemspec
This page took 1.365227 seconds and 3 git commands to generate.