forked from pool/vagrant
6b962937d9e2f72ce237b4102a243e831c289be627d24a50af6744921834b8ec
update to 2.2.6 OBS-URL: https://build.opensuse.org/request/show/741246 OBS-URL: https://build.opensuse.org/package/show/Virtualization:vagrant/vagrant?expand=0&rev=35
Packaging Vagrant plugins
-------------------------
This convention is based on the Fedora vagrant package.
Vagrant plugins are ordinary rubygems, but they should not be packaged as
these. First off all, we don't need to build the plugin with a ruby version
other then the ruby version with which vagrant was built. Furthermore, vagrant
will _only_ recognize gems inside its own directory structure as plugins and not
arbitrary rubygems.
An example specfile for a vagrant plugin looks like this:
``` spec
%global rb_build_versions %vagrant_rb_build_versions
%global rb_build_abi %vagrant_rb_build_abi
%global rb_default_ruby_suffix %vagrant_rb_default_ruby_suffix
Name: vagrant-MYPLUGIN
Version: $VERSION
Release: 0
%define mod_name %{name}
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{rubygem gem2rpm}
BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
BuildRequires: vagrant
BuildArch: noarch
Url: $URL
Source: $SRC
Source1: gem2rpm.yml
Summary: Vagrant provider for libvirt
License: MIT
Group: Development/Languages/Ruby
%description
$DESCRIPTION
%global vagrant_plugin_name %{name}
%prep
%gem_unpack
%build
%gem_build
%install
%vagrant_plugin_install -n %{mod_full_name}/%{vagrant_plugin_name}-%{version}.gem
%files
%{vagrant_plugin_instdir}
%{vagrant_plugin_cache}
%{vagrant_plugin_spec}
%changelog
```
Description
Languages
Shell
39.9%
Roff
32.9%
Ruby
27.2%