msrb pushed to jruby-maven-plugins (master). "Integrate with Fedora"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue May 19 13:38:46 UTC 2015


From 24ba7139c1652115a9a7b88cf6ce3fd7565582f4 Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Tue, 19 May 2015 15:30:06 +0200
Subject: Integrate with Fedora


diff --git a/fedora-integration.patch b/fedora-integration.patch
new file mode 100644
index 0000000..fab3b9f
--- /dev/null
+++ b/fedora-integration.patch
@@ -0,0 +1,29 @@
+diff --git a/ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java b/ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java
+index 6b12311..977229c 100644
+--- a/ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java
++++ b/ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java
+@@ -101,7 +101,23 @@ class AntLauncher extends AbstractLauncher {
+             java.createJvmarg().setValue("-Xbootclasspath/a:"
+                     + jrubyJar.getAbsolutePath());
+         }
+-        
++
++        // Fedora integration
++        final Variable vendorDir = new Variable();
++        vendorDir.setKey("vendor.dir.general");
++        vendorDir.setValue(System.getProperty("vendor.dir.general", "@FEDORA_VENDOR_DIR_GENERAL@"));
++        java.addSysproperty(vendorDir);
++
++        final Variable siteDir = new Variable();
++        siteDir.setKey("site.dir.general");
++        siteDir.setValue(System.getProperty("site.dir.general", "@FEDORA_SITE_DIR_GENERAL@"));
++        java.addSysproperty(siteDir);
++
++        final Variable rubygemsDir = new Variable();
++        rubygemsDir.setKey("vendor.dir.rubygems");
++        rubygemsDir.setValue(System.getProperty("vendor.dir.rubygems", "@FEDORA_VENDOR_DIR_RUBYGEMS@"));
++        java.addSysproperty(rubygemsDir);
++
+         if (outputFile != null) {
+             java.setOutput(outputFile);
+         }
diff --git a/jruby-maven-plugins.spec b/jruby-maven-plugins.spec
index 3fae722..f8595dc 100644
--- a/jruby-maven-plugins.spec
+++ b/jruby-maven-plugins.spec
@@ -1,6 +1,6 @@
 Name:           jruby-maven-plugins
 Version:        1.0.10
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        JRuby Maven plugins
 
 License:        MIT
@@ -8,6 +8,7 @@ URL:            https://github.com/torquebox/jruby-maven-plugins
 Source0:        https://github.com/torquebox/%{name}/archive/%{name}-%{version}.tar.gz
 # https://github.com/torquebox/jruby-maven-plugins/pull/72
 Patch0:         0001-Update-plexus-archiver-to-3.0.patch
+Patch1:         fedora-integration.patch
 
 BuildRequires:  maven-local
 BuildRequires:  mvn(junit:junit)
@@ -55,6 +56,12 @@ rm -Rf ruby-tools/src/main/resources/rails-{templates,resources}
 rm -Rf ruby-tools/src/main/java/de/saumya/mojo/ruby/rails
 
 %patch0 -p1
+%patch1 -p1
+
+# TODO: not very nice, how to improve it?
+sed -i 's|@FEDORA_VENDOR_DIR_GENERAL@|%{_datadir}/jruby/lib|' ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java
+sed -i 's|@FEDORA_SITE_DIR_GENERAL@|%{_prefix}/local/share/jruby/lib|' ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java
+sed -i 's|@FEDORA_VENDOR_DIR_RUBYGEMS@|%{_datadir}/rubygems|' ruby-tools/src/main/java/de/saumya/mojo/ruby/script/AntLauncher.java
 
 %pom_remove_dep :maven-tools ruby-tools
 
@@ -78,6 +85,9 @@ rm -Rf ruby-tools/src/main/java/de/saumya/mojo/ruby/rails
 %license license.txt
 
 %changelog
+* Tue May 19 2015 Michal Srb <msrb at redhat.com> - 1.0.10-3
+- Integrate with Fedora
+
 * Fri May 15 2015 Michal Srb <msrb at redhat.com> - 1.0.10-2
 - Do not build rails3 plugin
 - Install readme file
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/jruby-maven-plugins.git/commit/?h=master&id=24ba7139c1652115a9a7b88cf6ce3fd7565582f4


More information about the scm-commits mailing list