[DRE-commits] [ruby-maven-libs] 09/10: Add patches

Miguel Landaeta nomadium at moszumanska.debian.org
Fri Mar 10 07:28:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

nomadium pushed a commit to branch master
in repository ruby-maven-libs.

commit 4fb5d1d6350c674a02366a8ade70e2af919aaccf
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Thu Mar 9 18:46:46 2017 +0000

    Add patches
---
 debian/patches/01-use-debian-maven-home.patch      | 16 +++++++++++++++
 .../02-do-not-hard-code-maven-version.patch        | 23 ++++++++++++++++++++++
 debian/patches/series                              |  2 ++
 3 files changed, 41 insertions(+)

diff --git a/debian/patches/01-use-debian-maven-home.patch b/debian/patches/01-use-debian-maven-home.patch
new file mode 100644
index 0000000..0c0f735
--- /dev/null
+++ b/debian/patches/01-use-debian-maven-home.patch
@@ -0,0 +1,16 @@
+Description: Use correct Maven home directory in Debian
+Author: Miguel Landaeta <nomadium at debian.org>
+Forwarded: no
+Last-Update: 2017-03-08
+
+--- ruby-maven-libs-3.3.9+ds.orig/lib/maven.rb
++++ ruby-maven-libs-3.3.9+ds/lib/maven.rb
+@@ -16,7 +16,7 @@ module Maven
+   def self.home
+     @home ||= begin
+                 dir = File.dirname( File.expand_path( __FILE__ ) )
+-                File.expand_path( "#{dir}/../maven-home" )
++                File.expand_path( "#{dir}/../../../share/maven" )
+               end
+   end
+ 
diff --git a/debian/patches/02-do-not-hard-code-maven-version.patch b/debian/patches/02-do-not-hard-code-maven-version.patch
new file mode 100644
index 0000000..bb67910
--- /dev/null
+++ b/debian/patches/02-do-not-hard-code-maven-version.patch
@@ -0,0 +1,23 @@
+Description: Do not hard-code Maven version in source code
+Author: Miguel Landaeta <nomadium at debian.org>
+Forwarded: no
+Last-Update: 2017-03-09
+
+--- ruby-maven-libs-3.3.9+ds.orig/lib/maven.rb
++++ ruby-maven-libs-3.3.9+ds/lib/maven.rb
+@@ -1,6 +1,14 @@
+ module Maven
+ 
+-  VERSION = '3.3.9'.freeze
++  # $ mvn --version
++  # Apache Maven 3.3.9
++  # Maven home: /usr/share/maven
++  # Java version: 1.8.0_121, vendor: Oracle Corporation
++  # Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
++  # Default locale: en_US, platform encoding: UTF-8
++  # OS name: "linux", version: "4.9.0-1-amd64", arch: "amd64", family: "unix"
++  mvn_cmd_path = File.join(File.expand_path(File.dirname(__FILE__)), '..', '..', '..', 'bin', 'mvn')
++  VERSION = `#{mvn_cmd_path} --version`.split("\n").grep(/^Apache\ Maven/).shift.split[2].freeze # => "3.3.9"
+ 
+   def self.exec( *args )
+     if args.member?( '-Dverbose=true' ) || args.member?( '-Dverbose' ) || args.member?( '-X' )
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7d5b1b9
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01-use-debian-maven-home.patch
+02-do-not-hard-code-maven-version.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-maven-libs.git



More information about the Pkg-ruby-extras-commits mailing list