Blame SPECS/eclipse-jgit.spec

d37b49
%global install_loc    %{_datadir}/eclipse/dropins/jgit
d37b49
%global version_suffix 201406201815-r
d37b49
d37b49
%{?scl:%scl_package eclipse-jgit}
d37b49
%{!?scl:%global pkg_name %{name}}
d37b49
%{!?maven_scl:%global maven_scl_prefix  %{nil}}
d37b49
d37b49
# Use SCL-ized package on RHEL < 7 and base otherwise
d37b49
%if 0%{?rhel} < 7
d37b49
%global base_or_scl %{?scl_prefix}
d37b49
%else
d37b49
%global base_or_scl %{nil}
d37b49
%endif
d37b49
d37b49
d37b49
Name:           %{?scl_prefix}eclipse-jgit
d37b49
Version:        3.4.1
d37b49
Release:        1%{?dist}
d37b49
Summary:        Eclipse JGit
d37b49
d37b49
Group:          Development/Tools
d37b49
License:        BSD
d37b49
URL:            http://www.eclipse.org/egit/
d37b49
Source0:        http://git.eclipse.org/c/jgit/jgit.git/snapshot/jgit-%{version}.%{version_suffix}.tar.bz2
d37b49
Patch0:         fix_jgit_sh.patch
d37b49
Patch1:         eclipse-jgit-413163.patch
d37b49
Patch2:         fix_category.patch
d37b49
Patch3:         java7module.patch
d37b49
d37b49
BuildArch: noarch
d37b49
d37b49
BuildRequires: java-devel
d37b49
BuildRequires: %{?scl_prefix}eclipse-pde >= 1:3.5.0
d37b49
BuildRequires:  %{maven_scl_prefix}javapackages-tools
d37b49
BuildRequires:  %{maven_scl_prefix}maven-local
d37b49
BuildRequires:  %{maven_scl_prefix}maven-compiler-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-install-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-jar-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-javadoc-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-release-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-resources-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-surefire-plugin
d37b49
BuildRequires:  %{maven_scl_prefix}maven-surefire-provider-junit
d37b49
BuildRequires:  %{maven_scl_prefix}maven-shade-plugin
d37b49
BuildRequires:  tycho
d37b49
BuildRequires:  %{?scl_prefix}eclipse-equinox-osgi
d37b49
BuildRequires:  %{?scl_prefix}eclipse-platform
d37b49
BuildRequires:  %{?scl_prefix}args4j >= 2.0.12
d37b49
BuildRequires:  %{base_or_scl}apache-commons-compress
d37b49
BuildRequires:  %{base_or_scl}xz-java >= 1.1-2
d37b49
BuildRequires:  %{?scl_prefix}javaewah
d37b49
BuildRequires:  %{maven_scl_prefix}mvn(org.codehaus.mojo:build-helper-maven-plugin)
d37b49
BuildRequires:  %{?scl_prefix}feclipse-maven-plugin >= 0.0.3
d37b49
%{?scl:Requires: %scl_runtime}
d37b49
Requires: %{?scl_prefix}eclipse-platform >= 3.5.0
d37b49
Requires: %{?scl_prefix}javaewah
d37b49
Requires: %{?scl_prefix}args4j
d37b49
Requires: %{base_or_scl}apache-commons-compress
d37b49
Requires: %{base_or_scl}xz-java >= 1.1-2
d37b49
d37b49
%description
d37b49
A pure Java implementation of the Git version control system.
d37b49
d37b49
%package -n     %{?scl_prefix}jgit-javadoc
d37b49
Summary:        API documentation for %{pkg_name}
d37b49
Group:          Documentation
d37b49
d37b49
%description -n %{?scl_prefix}jgit-javadoc
d37b49
%{summary}.
d37b49
d37b49
%package -n     %{?scl_prefix}jgit
d37b49
Summary:        Java-based command line Git interface
d37b49
Group:          Development/Tools
d37b49
Requires:       %{?scl_prefix}args4j >= 2.0.12
d37b49
Requires:       %{base_or_scl}apache-commons-compress
d37b49
Requires:       %{base_or_scl}xz-java >= 1.1-2
d37b49
Requires:       %{?scl_prefix}javaewah
d37b49
d37b49
%description -n %{?scl_prefix}jgit
d37b49
Command line Git tool built entirely in Java.
d37b49
d37b49
%prep
d37b49
%setup -n jgit-%{version}.%{version_suffix} -q
d37b49
d37b49
scl enable %{scl} - <<"EOF"
d37b49
%patch0
d37b49
%patch1 -p1
d37b49
%patch2 -b .sav
d37b49
%patch3
d37b49
d37b49
#javaewah change
d37b49
sed -i -e "s/javaewah/com.googlecode.javaewah.JavaEWAH/g" org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
d37b49
d37b49
#don't try to get it from local *maven* repo, use tycho resolved one
d37b49
%pom_remove_dep com.googlecode.javaewah:JavaEWAH
d37b49
%pom_remove_dep org.eclipse.jgit:org.eclipse.jgit.junit.http org.eclipse.jgit.packaging/org.eclipse.jgit.repository
d37b49
d37b49
#those bundles don't compile with latest jetty
d37b49
%pom_disable_module org.eclipse.jgit.http.test
d37b49
%pom_disable_module org.eclipse.jgit.pgm.test
d37b49
%pom_disable_module org.eclipse.jgit.junit.http
d37b49
d37b49
%pom_disable_module org.eclipse.jgit.target org.eclipse.jgit.packaging
d37b49
%pom_xpath_remove "pom:build/pom:pluginManagement/pom:plugins/pom:plugin/pom:configuration/pom:target" org.eclipse.jgit.packaging/pom.xml
d37b49
d37b49
%pom_disable_module org.eclipse.jgit.junit.feature org.eclipse.jgit.packaging
d37b49
%pom_disable_module org.eclipse.jgit.pgm.feature org.eclipse.jgit.packaging
d37b49
%pom_disable_module org.eclipse.jgit.pgm.source.feature org.eclipse.jgit.packaging
d37b49
%pom_disable_module org.eclipse.jgit.http.apache.feature org.eclipse.jgit.packaging
d37b49
d37b49
sed -i -e 's/\, multiValued = true//' org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
d37b49
sed -i -e 's/\, multiValued = true//' org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
d37b49
sed -i -e 's/0.7.9,0.8.0/0.7.9,0.9.0/g' org.eclipse.jgit/META-INF/MANIFEST.MF
d37b49
sed -i -e 's/0.7.9,0.8.0/0.7.9,0.9.0/g' org.eclipse.jgit.test/META-INF/MANIFEST.MF
d37b49
sed -i -e 's/o.hidden()/o.help(),o.hidden()/g' org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
d37b49
%pom_remove_plugin org.jacoco:jacoco-maven-plugin
d37b49
EOF
d37b49
d37b49
%build
d37b49
scl enable %{scl} - <<"EOF"
d37b49
mvn-rpmbuild -Dmaven.test.skip=true install
d37b49
mvn-rpmbuild -Dmaven.test.skip=true -f org.eclipse.jgit.packaging/pom.xml verify
d37b49
EOF
d37b49
d37b49
%install
d37b49
scl enable %{scl} - <<"EOF"
d37b49
install -d -m 755 %{buildroot}%{install_loc}
d37b49
d37b49
mvn-rpmbuild org.fedoraproject:feclipse-maven-plugin:install  \
d37b49
               -DsourceRepo=`pwd`/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/target/repository \
d37b49
               -DtargetLocation=%{buildroot}%{install_loc}/eclipse
d37b49
d37b49
pushd %{buildroot}%{install_loc}/eclipse/plugins
d37b49
    rm com.jcraft.jsch_*.jar
d37b49
    rm com.googlecode.javaewah.JavaEWAH_*.jar
d37b49
    rm org.apache.commons.compress_*.jar
d37b49
#to the future maintainers - dont forget to add those jars to the fix_jgit_sh.patch
d37b49
    ln -s %{_javadir}/args4j.jar
d37b49
%if 0%{?rhel} < 7
d37b49
    ln -s %{_javadir}/commons-compress.jar
d37b49
    ln -s %{_javadir}/xz-java.jar
d37b49
%else
d37b49
    ln -s %{_root_datadir}/java/commons-compress.jar
d37b49
    ln -s %{_root_datadir}/java/xz-java.jar
d37b49
%endif
d37b49
    ln -s %{_javadir}/javaewah/JavaEWAH.jar
d37b49
popd
d37b49
d37b49
#giant hack - for some reason source bundle is in the repo, install the proper one
d37b49
cp org.eclipse.jgit/target/org.eclipse.jgit-*-r.jar %{buildroot}%{install_loc}/eclipse/plugins 
d37b49
d37b49
# JARs
d37b49
install -d -m 0755 %{buildroot}%{_javadir}/jgit
d37b49
install -m 644 org.eclipse.jgit/target/org.eclipse.jgit-%{version}.%{version_suffix}.jar   %{buildroot}%{_javadir}/jgit/jgit.jar
d37b49
install -m 644 org.eclipse.jgit.ui/target/org.eclipse.jgit.ui-%{version}.%{version_suffix}.jar   %{buildroot}%{_javadir}/jgit/ui.jar
d37b49
install -m 644 org.eclipse.jgit.java7/target/org.eclipse.jgit.java7-%{version}.%{version_suffix}.jar   %{buildroot}%{_javadir}/jgit/java7.jar
d37b49
install -m 644 org.eclipse.jgit.console/target/org.eclipse.jgit.console-%{version}.%{version_suffix}.jar   %{buildroot}%{_javadir}/jgit/console.jar
d37b49
install -m 644 org.eclipse.jgit.pgm/target/org.eclipse.jgit.pgm-%{version}.%{version_suffix}.jar   %{buildroot}%{_javadir}/jgit/pgm.jar
d37b49
# Javadocs
d37b49
install -d -m 755 %{buildroot}%{_javadocdir}/jgit
d37b49
cp -rp org.eclipse.jgit/target/apidocs %{buildroot}%{_javadocdir}/jgit
d37b49
cp -rp org.eclipse.jgit.ui/target/apidocs %{buildroot}%{_javadocdir}/jgit
d37b49
cp -rp org.eclipse.jgit.console/target/apidocs %{buildroot}%{_javadocdir}/jgit
d37b49
# POM Files
d37b49
install -d -m 755 %{buildroot}%{_mavenpomdir}
d37b49
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-jgit-parent.pom
d37b49
install -pm 644 org.eclipse.jgit/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-jgit.pom
d37b49
install -pm 644 org.eclipse.jgit.ui/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-ui.pom
d37b49
install -pm 644 org.eclipse.jgit.java7/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-java7.pom
d37b49
install -pm 644 org.eclipse.jgit.console/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-console.pom
d37b49
install -pm 644 org.eclipse.jgit.pgm/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-pgm.pom
d37b49
d37b49
%add_maven_depmap JPP.jgit-jgit.pom jgit/jgit.jar
d37b49
%add_maven_depmap JPP.jgit-ui.pom jgit/ui.jar
d37b49
%add_maven_depmap JPP.jgit-java7.pom jgit/java7.jar
d37b49
%add_maven_depmap JPP.jgit-console.pom jgit/console.jar
d37b49
%add_maven_depmap JPP.jgit-pgm.pom jgit/pgm.jar
d37b49
%add_maven_depmap JPP-jgit-parent.pom
d37b49
# Binary
d37b49
install -dm 755 %{buildroot}%{_bindir}
d37b49
install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit
d37b49
EOF
d37b49
d37b49
%files
d37b49
%doc LICENSE 
d37b49
%doc README.md
d37b49
%{install_loc}
d37b49
d37b49
%files -n %{?scl_prefix}jgit
d37b49
%{_bindir}/jgit
d37b49
%{_javadir}/jgit
d37b49
%{_mavendepmapfragdir}/%{pkg_name}
d37b49
%{_mavenpomdir}/JPP-jgit-parent.pom
d37b49
%{_mavenpomdir}/JPP.jgit*.pom
d37b49
%doc LICENSE 
d37b49
%doc README.md
d37b49
d37b49
%files -n %{?scl_prefix}jgit-javadoc
d37b49
%{_javadocdir}/jgit
d37b49
%doc LICENSE 
d37b49
%doc README.md
d37b49
d37b49
%changelog
d37b49
* Mon Jun 30 2014 Alexander Kurtakov <akurtako@redhat.com> 3.4.1-1
d37b49
- Update to upstream 3.4.1 release.
d37b49
d37b49
* Tue Jun 3 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.2-3.2
d37b49
- Add missing R on args4j.
d37b49
d37b49
* Wed May 28 2014 Roland Grunberg <rgrunber@redhat.com> - 3.3.2-3.1
d37b49
- Fix symlink paths.
d37b49
d37b49
* Wed May 28 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.2-2.1
d37b49
- Add sclized Rs as auto-reqs are not working on RHEL 6.
d37b49
d37b49
* Wed May 21 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.2-2
d37b49
- Fix compile against latest args4j.
d37b49
d37b49
* Fri Apr 25 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.2-1
d37b49
- Update to 3.3.2.
d37b49
d37b49
* Mon Mar 31 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.1-2
d37b49
- Remove bundled commons-compress.
d37b49
d37b49
* Fri Mar 28 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.1-1
d37b49
- Update to 3.3.1.
d37b49
d37b49
* Tue Mar 11 2014 Alexander Kurtakov <akurtako@redhat.com> 3.3.0-1
d37b49
- Update to 3.3.0.
d37b49
d37b49
* Sun Dec 29 2013 Alexander Kurtakov <akurtako@redhat.com> 3.2.0-1
d37b49
- Update to 3.2.0.
d37b49
d37b49
* Thu Oct 3 2013 Krzysztof Daniel <kdaniel@redhat.com> 3.1.0-1
d37b49
- Update to Kepler SR1.
d37b49
d37b49
* Mon Aug 5 2013 Krzysztof Daniel <kdaniel@redhat.com> 3.0.0-7
d37b49
- Add missing jgit plugin back.
d37b49
d37b49
* Tue Jul 16 2013 Krzysztof Daniel <kdaniel@redhat.com> 3.0.0-6
d37b49
- Change the build system to mvn-rpmbuild.
d37b49
- Use feclipse-maven-plugin to install things.
d37b49
- Bug 413163 - Incompatible change in latest args4j: multiValued removed from @Option
d37b49
d37b49
* Fri Jul 5 2013 Neil Brian Guzman <nguzman@redhat.com> 3.0.0-5
d37b49
- Bump release
d37b49
d37b49
* Tue Jun 25 2013 Neil Brian Guzman <nguzman@redhat.com> 3.0.0-4
d37b49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d37b49
d37b49
* Tue Jun 25 2013 Krzysztof Daniel <kdaniel@redhat.com> 3.0.0-3
d37b49
- Add missing R: javaewah to eclipse-jgit.
d37b49
d37b49
* Tue Jun 25 2013 Krzysztof Daniel <kdaniel@redhat.com> 3.0.0-2
d37b49
- Move symlinks to eclipse-jgit.
d37b49
- Fix jgit classpath.
d37b49
d37b49
* Thu Jun 20 2013 Neil Brian Guzman <nguzman@redhat.com> 3.0.0-1
d37b49
- Update to 3.0.0 release
d37b49
d37b49
* Tue May 14 2013 Krzysztof Daniel <kdaniel@redhat.com> 2.3.1-2
d37b49
- Rebuild with latest icu4j.
d37b49
d37b49
* Thu Feb 21 2013 Roland Grunberg <rgrunber@redhat.com> - 2.3.1-1
d37b49
- SCL-ize package.
d37b49
d37b49
* Thu Feb 21 2013 Roland Grunberg <rgrunber@redhat.com> - 2.3.1-1
d37b49
- Update to 2.3.1 release.
d37b49
d37b49
* Thu Feb 14 2013 Roland Grunberg <rgrunber@redhat.com> - 2.2.0-3
d37b49
- jgit subpackage should own its symlinked dependencies.
d37b49
d37b49
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
d37b49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d37b49
d37b49
* Thu Jan 3 2013 Krzysztof Daniel <kdaniel@redhat.com> 2.2.0-1
d37b49
- Update to 2.2.0 release.
d37b49
d37b49
* Mon Oct 1 2012 Alexander Kurtakov <akurtako@redhat.com> 2.1.0-1
d37b49
- Update to 2.1.0 release.
d37b49
d37b49
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
d37b49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
d37b49
d37b49
* Mon Jul 2 2012 Alexander Kurtakov <akurtako@redhat.com> 2.0.0-1
d37b49
- Update to 2.0.0 upstream release.
d37b49
d37b49
* Fri Apr 27 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.3.0-3
d37b49
- Use eclipse-pdebuild over old pdebuild script.
d37b49
d37b49
* Thu Apr 26 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.3.0-2
d37b49
- Tweak .spec so as to avoid modifying to much of the .spec file
d37b49
- Fix upstream 1.3 release sources.
d37b49
d37b49
* Fri Feb 17 2012 Andrew Robinson <arobinso@redhat.com> 1.3.0-1
d37b49
- Update to 1.3.0 upstream release.
d37b49
d37b49
* Thu Jan 5 2012 Alexander Kurtakov <akurtako@redhat.com> 1.2.0-2
d37b49
- Build eclipse plugin first to not interfere with maven artifacts.
d37b49
d37b49
* Thu Jan 5 2012 Alexander Kurtakov <akurtako@redhat.com> 1.2.0-1
d37b49
- Update to 1.2.0 release.
d37b49
d37b49
* Fri Oct 28 2011 Andrew Robinson <arobinso@redhat.com> 1.1.0-4
d37b49
- Add jsch jar to the classpath.
d37b49
d37b49
* Fri Oct 28 2011 Alexander Kurtakov <akurtako@redhat.com> 1.1.0-3
d37b49
- Drop libs subpackage and use the sh script directly instead of the shaded executable.
d37b49
- Install jars in _javadir subdir as per guidelines.
d37b49
d37b49
* Thu Oct 27 2011 Andrew Robinson <arobinso@redhat.com> 1.1.0-2
d37b49
- Added Java libraries, javadocs and console binary subpackages.
d37b49
d37b49
* Fri Sep 23 2011 Andrew Robinson <arobinso@redhat.com> 1.1.0-1
d37b49
- Update to upstream release 1.1.0.
d37b49
d37b49
* Tue Jun 14 2011 Chris Aniszczyk <zx@redhat.com> 1.0.0-2
d37b49
- Update to upstream release 1.0.0.201106090707-r.
d37b49
d37b49
* Tue Jun 07 2011 Chris Aniszczyk <zx@redhat.com> 1.0.0-1
d37b49
- Update to upstream release 1.0.0.
d37b49
d37b49
* Tue May 03 2011 Chris Aniszczyk <zx@redhat.com> 0.12.1-1
d37b49
- Update to upstream release 0.12.1.
d37b49
d37b49
* Tue Feb 22 2011 Chris Aniszczyk <zx@redhat.com> 0.11.3-1
d37b49
- Update to upstream release 0.11.3.
d37b49
d37b49
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-2
d37b49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d37b49
d37b49
* Wed Dec 22 2010 Chris Aniszczyk <zx@redhat.com> 0.10.1-1
d37b49
- Update to upstream release 0.10.1.
d37b49
d37b49
* Thu Oct 7 2010 Chris Aniszczyk <zx@redhat.com> 0.9.3-1
d37b49
- Update to upstream release 0.9.3.
d37b49
d37b49
* Wed Sep 15 2010 Severin Gehwolf <sgehwolf@redhat.com> 0.9.1-1
d37b49
- Update to upstream release 0.9.1.
d37b49
d37b49
* Thu Aug 26 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.9.0-0.1.20100825git
d37b49
- Make release tag more readable (separate "0.1" and pre-release tag by ".").
d37b49
d37b49
* Wed Aug 25 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.9.0-0.120100825git
d37b49
- Pre-release version of JGit 0.9.0
d37b49
d37b49
* Fri Jun 25 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.8.4-2
d37b49
- Increase release number to make tagging work.
d37b49
d37b49
* Wed Jun 23 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.8.4-1
d37b49
- Rebase to 0.8.4 release.
d37b49
d37b49
* Mon Apr 12 2010 Jeff Johnston <jjohnstn@redhat.com> 0.7.1-1
d37b49
- Rebase to 0.7.1 release.
d37b49
d37b49
* Tue Feb 9 2010 Alexander Kurtakov <akurtako@redhat.com> 0.6.0-0.1.git20100208
d37b49
- New git snapshot.
d37b49
d37b49
* Thu Nov 5 2009 Alexander Kurtakov <akurtako@redhat.com> 0.6.0-0.1.git20091029
d37b49
- Correct release.
d37b49
d37b49
* Thu Oct 29 2009 Alexander Kurtakov <akurtako@redhat.com> 0.6.0-0.git20091029.1
d37b49
- Initial package