[packages/vagrant] try installing as gem

glen glen at pld-linux.org
Wed Dec 17 11:16:24 CET 2014


commit be655f4dfe2b2fae38ccadd4c7f057cde7f2236c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Dec 16 23:57:51 2014 +0200

    try installing as gem

 source_root.patch |  2 +-
 vagrant.spec      | 26 +++++++++++++++++---------
 2 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/vagrant.spec b/vagrant.spec
index f36df1f..a86c65e 100644
--- a/vagrant.spec
+++ b/vagrant.spec
@@ -4,12 +4,12 @@ Summary:	Provisioning and deployment of virtual instances
 Name:		vagrant
 Version:	1.7.1
 # NOTE: test that it actually works before doing rel "1"
-Release:	0.1
+Release:	0.3
 License:	MIT
 Group:		Applications/Emulators
 Source0:	https://github.com/mitchellh/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	6bfb1440145f943e7b683ac99d06adec
-Source100:	runtime-broken
+#Source100:	runtime-broken
 Patch0:		source_root.patch
 Patch1:		rubygems.patch
 Patch2:		no-warning.patch
@@ -136,11 +136,10 @@ end'
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir},%{_appdir}}
-cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
-cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
-cp -a keys plugins templates $RPM_BUILD_ROOT%{_appdir}
+install -d $RPM_BUILD_ROOT{%{ruby_gemdir}/gems/%{name}-%{version},%{ruby_specdir},%{_bindir}}
+cp -a lib bin keys plugins templates $RPM_BUILD_ROOT%{ruby_gemdir}/gems/%{name}-%{version}
 cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
+ln -s %{ruby_gemdir}/gems/%{name}-%{version}/bin/%{name} $RPM_BUILD_ROOT%{_bindir}
 
 install -d $RPM_BUILD_ROOT%{bash_compdir}
 cp -p contrib/bash/completion.sh $RPM_BUILD_ROOT%{bash_compdir}/%{name}
@@ -173,10 +172,19 @@ fi
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/vagrant
-%{ruby_vendorlibdir}/vagrant.rb
-%{ruby_vendorlibdir}/vagrant
+#%{ruby_vendorlibdir}/vagrant.rb
+#%{ruby_vendorlibdir}/vagrant
+#%{_appdir}
+
+%dir %{ruby_gemdir}/gems/%{name}-%{version}
+%dir %{ruby_gemdir}/gems/%{name}-%{version}/bin
+%attr(755,root,root) %{ruby_gemdir}/gems/%{name}-%{version}/bin/*
+%{ruby_gemdir}/gems/%{name}-%{version}/keys
+%{ruby_gemdir}/gems/%{name}-%{version}/lib
+%{ruby_gemdir}/gems/%{name}-%{version}/plugins
+%{ruby_gemdir}/gems/%{name}-%{version}/templates
+
 %{ruby_specdir}/%{name}-%{version}.gemspec
-%{_appdir}
 
 %files -n bash-completion-%{name}
 %defattr(644,root,root,755)
diff --git a/source_root.patch b/source_root.patch
index d94faa6..70f9ee2 100644
--- a/source_root.patch
+++ b/source_root.patch
@@ -15,7 +15,7 @@
    Kernel.exec(
      ruby_path,
 -    File.expand_path("../../lib/vagrant/pre-rubygems.rb", __FILE__),
-+    File.expand_path("/usr/share/ruby/vendor_ruby/vagrant/pre-rubygems.rb", __FILE__),
++    File.expand_path("/usr/share/gems/gems/vagrant-1.7.1/lib/vagrant/pre-rubygems.rb", __FILE__),
      *ARGV)
    raise "Fatal error: this line should never be reached"
  end
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vagrant.git/commitdiff/be655f4dfe2b2fae38ccadd4c7f057cde7f2236c



More information about the pld-cvs-commit mailing list