[packages/vagrant] inline version string
glen
glen at pld-linux.org
Tue Jul 22 04:26:15 CEST 2014
commit 423e25f8001fc66d12c958a323536178be285a22
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun May 4 11:12:23 2014 +0300
inline version string
vagrant.spec | 7 ++++++-
version.patch | 10 ++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/vagrant.spec b/vagrant.spec
index a7eedca..8f67148 100644
--- a/vagrant.spec
+++ b/vagrant.spec
@@ -3,7 +3,7 @@
Summary: Provisioning and deployment of virtual instances
Name: vagrant
Version: 1.5.4
-Release: 0.3
+Release: 0.4
License: MIT
Group: Applications/Emulators
Source0: https://github.com/mitchellh/vagrant/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@ Patch0: source_root.patch
Patch1: rubygems.patch
Patch2: no-warning.patch
Patch3: %{name}file-shell-provision.patch
+Patch4: version.patch
URL: http://www.vagrantup.com/
BuildRequires: bash
BuildRequires: rpm-rubyprov
@@ -111,6 +112,10 @@ Ruby documentation for %{gem_name}
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+
+VERSION=$(cat version.txt)
+sed -i -e "s/__VERSION__/$VERSION/" lib/vagrant/version.rb
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
diff --git a/version.patch b/version.patch
new file mode 100644
index 0000000..ab6ad89
--- /dev/null
+++ b/version.patch
@@ -0,0 +1,10 @@
+--- vagrant-1.5.4/lib/vagrant/version.rb~ 2014-04-21 21:50:01.000000000 +0300
++++ vagrant-1.5.4/lib/vagrant/version.rb 2014-05-04 11:10:11.382221217 +0300
+@@ -2,6 +2,5 @@
+ # This will always be up to date with the current version of Vagrant,
+ # since it is used to generate the gemspec and is also the source of
+ # the version for `vagrant -v`
+- VERSION = File.read(
+- File.expand_path("../../../version.txt", __FILE__)).chomp
++ VERSION = '__VERSION__'
+ end
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vagrant.git/commitdiff/4619d17a7c5f736c734543ef4665fda09d7195b5
More information about the pld-cvs-commit
mailing list