# # spec file for package vagrant # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2012 Laurent Bigonville , License GPL-2.0+ # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define mod_name vagrant %define mod_full_name %{mod_name}-%{version} %{!?vim_data_dir:%global vim_data_dir /usr/share/vim/%(readlink /usr/share/vim/current)} Name: vagrant Version: 1.8.1 Release: 0 Summary: Build and distribute virtualized development environments License: MIT Group: Development/Languages/Ruby Url: https://github.com/mitchellh/vagrant Source0: https://github.com/mitchellh/vagrant/archive/v%{version}/%{mod_name}-%{version}.tar.gz Source2: vagrant.1 Source3: README.SUSE Source99: %{name}-rpmlintrc Provides: rubygem-vagrant = %{version} Obsoletes: rubygem-vagrant < %{version} Recommends: vagrant-libvirt # Patch2: 0002-Disable-Checkpoint.patch Patch3: 0003-VERSION-fallback-to-usr-share-vagrant-version.txt.patch Patch4: 0004-bin-vagrant-silence-warning-about-installer.patch Patch5: 0005-Read-data-from-usr-share-vagrant.patch Patch6: 0006-Look-up-vagrant-pre-rubygems.rb-from-the-installed-p.patch Patch7: 0007-Make-Bundler-also-lookup-into-rubygems-integration-p.patch Patch8: 0008-Use-a-private-temporary-dir.patch Patch9: 0009-linux-cap-halt-don-t-wait-for-shutdown-h-now-to-fini.patch Patch11: 0011-Support-system-installed-plugins.patch Patch12: 0012-require-vagrant-version-from-system.patch Patch13: 0011-Relax-dependency-resolution.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # force only one ruby version %define rb_build_versions %rb_default_ruby %define rb_build_abi %rb_default_ruby_abi # BuildRequires: %{ruby >= 2.0.0} BuildRequires: %{rubygem bundler} BuildRequires: %{rubygem childprocess >= 0.3.7} BuildRequires: %{rubygem erubis >= 2.7.0} BuildRequires: %{rubygem i18n >= 0.6.0} BuildRequires: %{rubygem listen} BuildRequires: %{rubygem log4r >= 1.1.9} BuildRequires: %{rubygem mime-types:1} BuildRequires: %{rubygem net-scp:1.1 >= 1.1.0} BuildRequires: %{rubygem net-sftp >= 1.1.0} BuildRequires: %{rubygem net-ssh >= 2.6.6} BuildRequires: %{rubygem nokogiri} BuildRequires: ruby-macros >= 5 # inotify should go here # BuildRequires: % {rubygem rb-kqueue:0.2 >= 0.2.0} BuildRequires: %{rubygem rest-client} # Requires: %{rubygem bundler} Requires: %{rubygem childprocess >= 0.3.7} Requires: %{rubygem erubis >= 2.7.0} Requires: %{rubygem i18n >= 0.6.0} Requires: %{rubygem listen} Requires: %{rubygem log4r >= 1.1.9} Requires: %{rubygem mime-types:1} Requires: %{rubygem net-scp:1.1 >= 1.1.0} Requires: %{rubygem net-sftp >= 1.1.0} Requires: %{rubygem net-ssh >= 2.6.6} Requires: %{rubygem nokogiri} # inotify should go here # Requires: % {rubygem rb-kqueue:0.2 >= 0.2.0} Requires: %{rubygem rest-client} # Requires: bsdtar Requires: curl Requires: openssh # %description Vagrant is a tool for building and distributing virtualized development environments. %package vim Summary: Vagrantfile syntax files for the vim editor Group: Development/Languages/Ruby Supplements: packageand(vagrant:vim) BuildRequires: vim Requires: vim BuildArch: noarch %description vim Optional dependency offering vim syntax files for Vagrantfile %package emacs Summary: Vagrantfile syntax files for the emacs editor Group: Development/Languages/Ruby Supplements: packageand(vagrant:emacs_program) BuildRequires: emacs-nox Requires: emacs_program BuildArch: noarch %description emacs Optional dependency offering emacs syntax files for Vagrantfile %package bash-completion Summary: Vagrant bash autocompletion Group: Development/Languages/Ruby Supplements: packageand(vagrant:bash) Requires: bash BuildArch: noarch %description bash-completion Optional dependency offering bash completion for vagrant %prep %setup -q -n %{mod_full_name} %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 cp %{SOURCE3} . %build mv %{mod_name}.gemspec %{mod_full_name}.gemspec %gem_build mv %{mod_full_name}.gem %{_sourcedir} bundle exec bin/vagrant --version %install %if %suse_version > 1315 %gem_install -f --no-symlink-binaries %else %gem_install -f %endif %{__mkdir_p} %{buildroot}%{_mandir}/man1 install -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1/vagrant.1 install -D -d -m 0755 \ %{buildroot}%{_sysconfdir}/bash_completion.d/ \ %{buildroot}%{vim_data_dir}/plugin/ \ %{buildroot}%{_datadir}/emacs/site-lisp/ mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/contrib/bash/completion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/%{mod_name}.sh mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/contrib/vim/vagrantfile.vim %{buildroot}%{vim_data_dir}/plugin/%{mod_name}.vim mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/contrib/emacs/vagrant.el %{buildroot}%{_datadir}/emacs/site-lisp/%{mod_name}.el %if %suse_version > 1315 mv -v %{buildroot}%{_bindir}/vagrant.%{rb_default_ruby_suffix} %{buildroot}%{_bindir}/vagrant %endif mkdir -p %{buildroot}%{_datadir}/%{name} mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/keys %{buildroot}%{_datadir}/%{name}/keys mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/plugins %{buildroot}%{_datadir}/%{name}/plugins mv %{buildroot}%{gem_base}/gems/%{mod_full_name}/templates %{buildroot}%{_datadir}/%{name}/templates chmod -x %{buildroot}%{_datadir}/%{name}/templates/locales/en.yml install -m 644 version.txt %{buildroot}%{_datadir}/%{name} mkdir -p %{buildroot}%{_datadir}/%{name}-plugins/plugins.d echo "{}" > %{buildroot}%{_datadir}/%{name}-plugins/plugins.json rm -rf %{buildroot}%{gem_base}/gems/%{mod_full_name}/.travis.yml rm -rf %{buildroot}%{gem_base}/gems/%{mod_full_name}/.gitignore %files %defattr(-,root,root,-) %doc CHANGELOG.md LICENSE README.SUSE %{_bindir}/vagrant %{gem_base}/cache/%{mod_full_name}.gem %{gem_base}/doc/%{mod_full_name}/ %{gem_base}/gems/%{mod_full_name}/ %{gem_base}/specifications/%{mod_full_name}.gemspec %{_datadir}/%{name} %dir %{_datadir}/%{name}-plugins %dir %{_datadir}/%{name}-plugins/plugins.d %{_datadir}/%{name}-plugins/plugins.json %{_mandir}/man1/vagrant.* %files vim %defattr(-,root,root,-) %{vim_data_dir}/plugin/%{mod_name}.vim %files emacs %defattr(-,root,root,-) %{_datadir}/emacs/site-lisp/%{mod_name}.el %files bash-completion %defattr(-,root,root,-) %config %{_sysconfdir}/bash_completion.d/%{mod_name}.sh %changelog