[eclipse-egit] Build/install with mvn_build/mvn_install

Mat Booth mbooth at fedoraproject.org
Tue Nov 11 16:29:30 UTC 2014


commit accb4f85244b387e7f9448c483ef3c783c5cf692
Author: Mat Booth <mat.booth at redhat.com>
Date:   Tue Nov 11 16:13:43 2014 +0000

    Build/install with mvn_build/mvn_install

 eclipse-egit.spec |   61 ++++++++++++++++++----------------------------------
 1 files changed, 21 insertions(+), 40 deletions(-)
---
diff --git a/eclipse-egit.spec b/eclipse-egit.spec
index 3da3c61..427bfa2 100644
--- a/eclipse-egit.spec
+++ b/eclipse-egit.spec
@@ -1,25 +1,24 @@
-%global install_loc      %{_datadir}/eclipse/dropins/egit
 %global version_suffix 201409260305-r
 
 %{?scl:%scl_package eclipse-egit}
 %{!?scl:%global pkg_name %{name}}
 
-Summary:          Eclipse Git Integration
 Name:             %{?scl_prefix}eclipse-egit
 Version:          3.5.0
-Release:          1%{?dist}
+Release:          2%{?dist}
+Summary:          Eclipse Git Integration
+
 License:          EPL
 URL:              http://www.eclipse.org/egit
 Source0:          http://git.eclipse.org/c/egit/egit.git/snapshot/egit-%{version}.%{version_suffix}.tar.bz2
 
-BuildRequires:    java-devel >= 1.6.0
-BuildRequires:    %{?scl_prefix}eclipse-jgit >= 3.5.0
-BuildRequires:    %{?scl_prefix}jgit >= 3.5.0
 BuildRequires:    tycho
+BuildRequires:    %{?scl_prefix}eclipse-jgit >= 3.5.0-3
 BuildRequires:    %{?scl_prefix}eclipse-mylyn-context-team
 BuildRequires:    %{?scl_prefix}eclipse-mylyn-docs-wikitext
+
 Requires:         %{?scl_prefix}eclipse-platform >= 1:3.5.0
-Requires:         %{?scl_prefix}eclipse-jgit >= 3.5.0
+Requires:         %{?scl_prefix}eclipse-jgit >= 3.5.0-3
 %{?scl:Requires: %scl_runtime}
 
 BuildArch:        noarch
@@ -39,58 +38,40 @@ Requires:    %{?scl_prefix}eclipse-mylyn-docs-wikitext
 Git integration for mylyn.
 
 %prep
-%setup -n egit-%{version}.%{version_suffix} -q
+%setup -q -n egit-%{version}.%{version_suffix}
+
 %pom_xpath_remove "pom:repositories"
 %pom_xpath_remove "pom:dependencies"
 %pom_xpath_remove "pom:profiles"
 %pom_xpath_remove "pom:build/pom:plugins/pom:plugin/pom:configuration/pom:target"
 %pom_xpath_remove "*[local-name() ='plugin' and (child::*[text()='tycho-packaging-plugin'])]"
 %pom_xpath_remove "pom:dependencies" org.eclipse.egit.doc/pom.xml
+%pom_disable_module org.eclipse.egit.repository
+%pom_disable_module org.eclipse.egit.source-feature
 %pom_disable_module org.eclipse.egit.target
 %pom_disable_module org.eclipse.egit.core.test
 %pom_disable_module org.eclipse.egit.ui.test
 %pom_disable_module org.eclipse.egit.mylyn.ui.test
 
-#TODO: revisit jgit packaging and maybe package source?
-sed -i -e "15,29d" org.eclipse.egit.repository/category.xml
-sed -i -e "9,11d" org.eclipse.egit.repository/category.xml
-sed -i -e "12,14d" org.eclipse.egit.repository/category.xml
+%mvn_package :*mylyn* mylyn
+%mvn_package :* egit
 
 %build
-xmvn -o clean verify -Dmaven.test.skip=true
+%mvn_build -j -f
 
 %install
-install -d -m 755 $RPM_BUILD_ROOT%{install_loc}
-install -d -m 755 $RPM_BUILD_ROOT%{install_loc}/eclipse
-install -d -m 755 $RPM_BUILD_ROOT%{install_loc}/eclipse/features
-install -d -m 755 $RPM_BUILD_ROOT%{install_loc}/eclipse/plugins
-
-unzip -q -d $RPM_BUILD_ROOT%{install_loc}/eclipse org.eclipse.egit.repository/target/org.eclipse.egit.repository-%{version}.*-r.zip
-pushd $RPM_BUILD_ROOT%{install_loc}/eclipse/features
-  for f in * ; do
-    f_name=${f/.jar//}
-    mkdir -p $f_name
-    unzip -d $f_name $f
-    rm $f 
-  done
-popd
-rm $RPM_BUILD_ROOT%{install_loc}/eclipse/*.jar
-
-%files
-%dir %{install_loc}
-%dir %{install_loc}/eclipse
-%dir %{install_loc}/eclipse/plugins
-%dir %{install_loc}/eclipse/features
-%{install_loc}/eclipse/features/org.eclipse.egit_*
-%{install_loc}/eclipse/plugins/
-%exclude %{install_loc}/eclipse/plugins/org.eclipse.egit.mylyn.ui_*.jar
+%mvn_install
+
+%files -f .mfiles-egit
 %doc LICENSE README.md
 
-%files mylyn
-%{install_loc}/eclipse/features/org.eclipse.egit.mylyn_*
-%{install_loc}/eclipse/plugins/org.eclipse.egit.mylyn.ui_*.jar
+%files mylyn -f .mfiles-mylyn
+%doc LICENSE README.md
 
 %changelog
+* Fri Nov 07 2014 Mat Booth <mat.booth at redhat.com> - 3.5.0-2
+- Build/install with mvn_build/mvn_install
+
 * Fri Oct 03 2014 Mat Booth <mat.booth at redhat.com> - 3.5.0-1
 - Update to latest upstream release 3.5.0
 


More information about the scm-commits mailing list