[DRE-commits] [ruby-trocla] 01/01: added patch to ship version inside rb without VERSION file
Jonas Genannt
genannt at moszumanska.debian.org
Mon Jun 1 17:11:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
genannt pushed a commit to branch master
in repository ruby-trocla.
commit 0c2654a0d83dcc5fc3e9dbdb08d6d5324812484c
Author: Jonas Genannt <jonas at brachium-system.net>
Date: Mon Jun 1 19:11:05 2015 +0200
added patch to ship version inside rb without VERSION file
---
debian/patches/fix_version.patch | 27 +++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 4 ++++
3 files changed, 32 insertions(+)
diff --git a/debian/patches/fix_version.patch b/debian/patches/fix_version.patch
new file mode 100644
index 0000000..a407512
--- /dev/null
+++ b/debian/patches/fix_version.patch
@@ -0,0 +1,27 @@
+Description: do not ship VERSION file on top library level
+Author: Jonas Genannt <genannt at debian.org>
+Forwared: not-needed
+
+--- a/lib/trocla/version.rb
++++ b/lib/trocla/version.rb
+@@ -2,16 +2,11 @@
+ class Trocla
+ class VERSION
+ version = {}
+- File.read(File.join(File.dirname(__FILE__), '../', 'VERSION')).each_line do |line|
+- type, value = line.chomp.split(":")
+- next if type =~ /^\s+$/ || value =~ /^\s+$/
+- version[type] = value
+- end
+
+- MAJOR = version['major']
+- MINOR = version['minor']
+- PATCH = version['patch']
+- BUILD = version['build']
++ MAJOR = 0
++ MINOR = 1
++ PATCH = 1
++ BUILD = ''
+
+ STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..26bfd54
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_version.patch
diff --git a/debian/rules b/debian/rules
index 57b4299..0456ce6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,3 +16,7 @@
%:
dh $@ --buildsystem=ruby --with ruby
+
+override_dh_auto_install:
+ dh_auto_install
+ rm debian/ruby-trocla/usr/lib/ruby/vendor_ruby/VERSION
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-trocla.git
More information about the Pkg-ruby-extras-commits
mailing list