[eclipse-jgit] Drop libs subpackage and use the sh script directly instead of the shaded executable.

Alexander Kurtakov akurtakov at fedoraproject.org
Fri Oct 28 11:12:08 UTC 2011


commit 32b3dee11e35682270d00c4579664c652c86f0c9
Author: Alexander Kurtakov < <akurtako at redhat.com>
Date:   Fri Oct 28 13:37:21 2011 +0300

    Drop libs subpackage and use the sh script directly instead of the
    shaded executable.
    
    Install jars in _javadir subdir as per guidelines.

 eclipse-jgit.spec |   97 ++++++++++++++++++++++------------------------------
 fix_jgit_sh.patch |   11 ++++++
 2 files changed, 52 insertions(+), 56 deletions(-)
---
diff --git a/eclipse-jgit.spec b/eclipse-jgit.spec
index 445d296..46f4460 100644
--- a/eclipse-jgit.spec
+++ b/eclipse-jgit.spec
@@ -3,7 +3,7 @@
 
 Name:           eclipse-jgit
 Version:        1.1.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Eclipse JGit
 
 Group:          Development/Tools
@@ -11,11 +11,21 @@ License:        BSD
 URL:            http://www.eclipse.org/egit/
 #Fetched from http://egit.eclipse.org/w/?p=jgit.git;a=snapshot;h=v1.1.0.201109151100-r;sf=tbz2
 Source0:        jgit-v1.1.0.201109151100-r.tar.bz2
+Patch0:         fix_jgit_sh.patch
 
 BuildArch: noarch
 
 BuildRequires: java-devel
 BuildRequires: eclipse-pde >= 1:3.5.0
+BuildRequires:  jpackage-utils
+BuildRequires:  maven-compiler-plugin
+BuildRequires:  maven-install-plugin
+BuildRequires:  maven-jar-plugin
+BuildRequires:  maven-javadoc-plugin
+BuildRequires:  maven-release-plugin
+BuildRequires:  maven-resources-plugin
+BuildRequires:  maven-surefire-plugin
+BuildRequires:  args4j >= 2.0.12
 Requires: eclipse-platform >= 3.5.0
 
 %description
@@ -29,25 +39,6 @@ Requires:       jpackage-utils
 %description -n jgit-javadoc
 %{summary}.
 
-%package -n     jgit-libs
-Summary:        Non-Eclipse JGit libraries
-Group:          Development/Libraries
-BuildRequires:  jpackage-utils
-BuildRequires:  maven-compiler-plugin
-BuildRequires:  maven-install-plugin
-BuildRequires:  maven-jar-plugin
-BuildRequires:  maven-javadoc-plugin
-BuildRequires:  maven-release-plugin
-BuildRequires:  maven-resources-plugin
-BuildRequires:  maven-surefire-plugin
-BuildRequires:  args4j >= 2.0.12
-Requires:       args4j >= 2.0.12
-Requires:       java >= 1.6.0
-Requires:       jpackage-utils
-
-%description -n jgit-libs
-Non-eclipse dependant installation of the core JGit libraries.
-
 %package -n     jgit
 Summary:        Java-based command line Git interface
 Group:          Development/Tools
@@ -61,15 +52,10 @@ Command line Git tool built entirely in Java.
 %prep
 %setup -n jgit -q
 sed -i -e "s|\${bundle-manifest}|\${source-bundle-manifest}|g" \
- org.eclipse.jgit/pom.xml
-sed -i -e "s|\${bundle-manifest}|\${source-bundle-manifest}|g" \
- org.eclipse.jgit.ui/pom.xml
-sed -i -e "s|\${bundle-manifest}|\${source-bundle-manifest}|g" \
- org.eclipse.jgit.console/pom.xml
-sed -i -e "s|\${bundle-manifest}|\${source-bundle-manifest}|g" \
- org.eclipse.jgit.iplog/pom.xml
-sed -i -e "s|\${bundle-manifest}|\${source-bundle-manifest}|g" \
- org.eclipse.jgit.pgm/pom.xml
+ org.eclipse.jgit/pom.xml org.eclipse.jgit.ui/pom.xml  org.eclipse.jgit.console/pom.xml \
+ org.eclipse.jgit.iplog/pom.xml org.eclipse.jgit.iplog/pom.xml org.eclipse.jgit.pgm/pom.xml
+
+%patch0
 
 %build
 # build JARs
@@ -79,18 +65,17 @@ mvn-rpmbuild -Dtranslate-qualifier=true install \
 %{eclipse_base}/buildscripts/pdebuild -f org.eclipse.jgit
 
 %install
-%{__rm} -rf %{buildroot}
 install -d -m 755 %{buildroot}%{install_loc}
 # Eclipse Plugin
 %{__unzip} -q -d %{buildroot}%{install_loc} \
      build/rpmBuild/org.eclipse.jgit.zip 
 # JARs
-install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 org.eclipse.jgit/target/org.eclipse.jgit-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/org.eclipse.jgit.jar
-install -m 644 org.eclipse.jgit.ui/target/org.eclipse.jgit.ui-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/org.eclipse.jgit.ui.jar
-install -m 644 org.eclipse.jgit.console/target/org.eclipse.jgit.console-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/org.eclipse.jgit.console.jar
-install -m 644 org.eclipse.jgit.iplog/target/org.eclipse.jgit.iplog-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/org.eclipse.jgit.iplog.jar
-install -m 644 org.eclipse.jgit.pgm/target/org.eclipse.jgit.pgm-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/org.eclipse.jgit.pgm.jar
+install -d -m 0755 %{buildroot}%{_javadir}/jgit
+install -m 644 org.eclipse.jgit/target/org.eclipse.jgit-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/jgit/jgit.jar
+install -m 644 org.eclipse.jgit.ui/target/org.eclipse.jgit.ui-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/jgit/ui.jar
+install -m 644 org.eclipse.jgit.console/target/org.eclipse.jgit.console-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/jgit/console.jar
+install -m 644 org.eclipse.jgit.iplog/target/org.eclipse.jgit.iplog-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/jgit/iplog.jar
+install -m 644 org.eclipse.jgit.pgm/target/org.eclipse.jgit.pgm-1.1.0.201109151100-r.jar   %{buildroot}%{_javadir}/jgit/pgm.jar
 # Javadocs
 install -d -m 755 %{buildroot}%{_javadocdir}/jgit
 cp -rp org.eclipse.jgit/target/apidocs %{buildroot}%{_javadocdir}/jgit
@@ -100,37 +85,33 @@ cp -rp org.eclipse.jgit.iplog/target/apidocs %{buildroot}%{_javadocdir}/jgit
 # POM Files
 install -d -m 755 %{buildroot}%{_mavenpomdir}
 install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-jgit-parent.pom
-install -pm 644 org.eclipse.jgit/pom.xml %{buildroot}%{_mavenpomdir}/JPP-org.eclipse.jgit.pom
-install -pm 644 org.eclipse.jgit.ui/pom.xml %{buildroot}%{_mavenpomdir}/JPP-org.eclipse.jgit.ui.pom
-install -pm 644 org.eclipse.jgit.console/pom.xml %{buildroot}%{_mavenpomdir}/JPP-org.eclipse.jgit.console.pom
-install -pm 644 org.eclipse.jgit.iplog/pom.xml %{buildroot}%{_mavenpomdir}/JPP-org.eclipse.jgit.iplog.pom
-install -pm 644 org.eclipse.jgit.pgm/pom.xml %{buildroot}%{_mavenpomdir}/JPP-org.eclipse.jgit.pgm.pom
-
-%add_maven_depmap JPP-org.eclipse.jgit.pom org.eclipse.jgit.jar
-%add_maven_depmap JPP-org.eclipse.jgit.ui.pom org.eclipse.jgit.ui.jar
-%add_maven_depmap JPP-org.eclipse.jgit.console.pom org.eclipse.jgit.console.jar
-%add_maven_depmap JPP-org.eclipse.jgit.iplog.pom org.eclipse.jgit.iplog.jar
-%add_maven_depmap JPP-org.eclipse.jgit.pgm.pom org.eclipse.jgit.pgm.jar
+install -pm 644 org.eclipse.jgit/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-jgit.pom
+install -pm 644 org.eclipse.jgit.ui/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-ui.pom
+install -pm 644 org.eclipse.jgit.console/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-console.pom
+install -pm 644 org.eclipse.jgit.iplog/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-iplog.pom
+install -pm 644 org.eclipse.jgit.pgm/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-pgm.pom
+
+%add_maven_depmap JPP.jgit-jgit.pom jgit/jgit.jar
+%add_maven_depmap JPP.jgit-ui.pom jgit/ui.jar
+%add_maven_depmap JPP.jgit-console.pom jgit/console.jar
+%add_maven_depmap JPP.jgit-iplog.pom jgit/iplog.jar
+%add_maven_depmap JPP.jgit-pgm.pom jgit/pgm.jar
 %add_maven_depmap JPP-jgit-parent.pom
 # Binary
 install -dm 755 %{buildroot}%{_bindir}
-install -m 755 org.eclipse.jgit.pgm/target/jgit %{buildroot}%{_bindir}/jgit
+install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit
 
 %files
 %doc LICENSE 
 %doc README
 %{install_loc}
 
-%files -n jgit-libs
-%{_javadir}/org.eclipse.jgit*
-%{_mavendepmapfragdir}/%{name}
-%{_mavenpomdir}/JPP-jgit-parent.pom
-%{_mavenpomdir}/JPP-org.eclipse.jgit*.pom
-%doc LICENSE 
-%doc README
-
 %files -n jgit
 %{_bindir}/jgit
+%{_javadir}/jgit
+%{_mavendepmapfragdir}/%{name}
+%{_mavenpomdir}/JPP-jgit-parent.pom
+%{_mavenpomdir}/JPP.jgit*.pom
 %doc LICENSE 
 %doc README
 
@@ -140,6 +121,10 @@ install -m 755 org.eclipse.jgit.pgm/target/jgit %{buildroot}%{_bindir}/jgit
 %doc README
 
 %changelog
+* Fri Oct 28 2011 Alexander Kurtakov <akurtako at redhat.com> 1.1.0-3
+- Drop libs subpackage and use the sh script directly instead of the shaded executable.
+- Install jars in _javadir subdir as per guidelines.
+
 * Thu Oct 27 2011 Andrew Robinson <arobinso at redhat.com> 1.1.0-2
 - Added Java libraries, javadocs and console binary subpackages.
 
diff --git a/fix_jgit_sh.patch b/fix_jgit_sh.patch
new file mode 100644
index 0000000..dac2b4d
--- /dev/null
+++ b/fix_jgit_sh.patch
@@ -0,0 +1,11 @@
+--- org.eclipse.jgit.pgm/jgit.sh.sav	2011-09-15 18:32:58.000000000 +0300
++++ org.eclipse.jgit.pgm/jgit.sh	2011-10-28 13:05:51.399038583 +0300
+@@ -60,7 +60,7 @@ esac
+ this_script=`which "$0" 2>/dev/null`
+ [ $? -gt 0 -a -f "$0" ] && this_script="$0"
+ cp=$this_script
+-
++export JGIT_CLASSPATH="/usr/share/java/jgit/*:/usr/share/java/args4j.jar"
+ if [ -n "$JGIT_CLASSPATH" ]
+ then
+ 	cp="$cp:$JGIT_CLASSPATH"


More information about the scm-commits mailing list