[tycho/f17] Update spec file to honour new java packaging guidelines.

Roland Grunberg rgrunber at fedoraproject.org
Fri Aug 24 19:37:49 UTC 2012


commit 8a43dfc9677ac7b4432c1431b85065e53cf326b5
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Fri Aug 10 13:57:20 2012 -0400

    Update spec file to honour new java packaging guidelines.

 tycho.spec |   44 +++++++++++++++++---------------------------
 1 files changed, 17 insertions(+), 27 deletions(-)
---
diff --git a/tycho.spec b/tycho.spec
index 8e76d71..6f6b22c 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -68,9 +68,6 @@ Requires:       maven-shared-verifier
 Requires:       maven-surefire-provider-junit4
 Requires:       eclipse-jdt
 
-Requires(post):       jpackage-utils
-Requires(postun):     jpackage-utils
-
 
 %description
 Tycho is a set of Maven plugins and extensions for building Eclipse
@@ -134,6 +131,8 @@ mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} install javadoc:aggregate
 
 mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name}
 install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+
+# pom and jar installation
 for mod in target-platform-configuration tycho-compiler-{jdt,plugin} \
            tycho-{core,embedder-api,testing-harness} \
 	   sisu-equinox/sisu-equinox{-api,-launching,-embedder} \
@@ -145,44 +144,34 @@ for mod in target-platform-configuration tycho-compiler-{jdt,plugin} \
    aid=`basename $mod`
    install -pm 644 $mod/pom.xml  $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
    install -m 644 $mod/target/$aid-%{version}%{snap}.jar %{buildroot}%{_javadir}/%{name}/$aid.jar
-   %add_to_maven_depmap org.eclipse.tycho $aid %{version} JPP/%{name} $aid
-   %add_to_maven_depmap org.sonatype.tycho $aid %{version} JPP/%{name} $aid
+   %add_maven_depmap JPP.%{name}-$aid.pom %{name}/$aid.jar -a "org.eclipse.tycho:$aid,org.sonatype.tycho:$aid"
 done
 
-for pommod in tycho-p2 tycho-bundles{,/org.eclipse.tycho.p2.resolver.impl} \
-           tycho-surefire tycho-release \
-	   sisu-equinox \
-           ;do
+# pom installation
+for pommod in tycho-p2 tycho-bundles tycho-surefire \
+              tycho-release sisu-equinox; do
    aid=`basename $pommod`
    install -pm 644 $pommod/pom.xml \
                $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$aid.pom
-   %add_to_maven_depmap org.eclipse.tycho $aid %{version} JPP/%{name} $aid
-   %add_to_maven_depmap org.sonatype.tycho $aid %{version} JPP/%{name} $aid
+   %add_maven_depmap JPP.%{name}-$aid.pom -a "org.eclipse.tycho:$aid,org.sonatype.tycho:$aid"
 done
 
-# runtime
+# p2 runtime
 pushd tycho-bundles/tycho-bundles-external
-install -pm 644 pom.xml  $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-bundles-external.pom
-install -m 644 target/tycho-bundles-external-%{version}*.zip %{buildroot}%{_javadir}/%{name}/tycho-bundles-external.zip
-%add_to_maven_depmap org.eclipse.tycho tycho-bundles-external %{version} JPP/%{name} tycho-bundles-external
-%add_to_maven_depmap org.sonatype.tycho tycho-bundles-external %{version} JPP/%{name} tycho-bundles-external
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-bundles-external.pom
+install -m 644 target/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external.zip
+%add_maven_depmap JPP.%{name}-tycho-bundles-external.pom %{name}/tycho-bundles-external.zip -a "org.eclipse.tycho:tycho-bundles-external,org.sonatype.tycho:tycho-bundles-external"
 popd
 
+# main
 install -pm 644 pom.xml  $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom
-%add_to_maven_depmap org.eclipse.tycho %{name} %{version} JPP/%{name} main
-%add_to_maven_depmap org.sonatype.tycho %{name} %{version} JPP/%{name} main
+%add_maven_depmap JPP.%{name}-main.pom -a "org.eclipse.tycho:$aid,org.sonatype.tycho:$aid"
 
 # javadoc
-install -dm 755 %{buildroot}%{_javadocdir}/%{name}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
-
-install -pm 755 %{SOURCE3} %{buildroot}%{_javadir}/%{name}/copy-platform-all
-
-%post
-%update_maven_depmap
+install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -pr target/site/api*/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 
-%postun
-%update_maven_depmap
+install -pm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_javadir}/%{name}/copy-platform-all
 
 %files
 %{_mavenpomdir}/*
@@ -196,6 +185,7 @@ install -pm 755 %{SOURCE3} %{buildroot}%{_javadir}/%{name}/copy-platform-all
 %changelog
 * Wed Aug 22 2012 Roland Grunberg <rgrunber at redhat.com> 0.15.0-4.1
 - Fix local mode resolution bug.
+- Update spec file to honour new java packaging guidelines.
 
 * Thu Aug 9 2012 Roland Grunberg <rgrunber at redhat.com> 0.16.0-4
 - Non-bootstrap build.


More information about the scm-commits mailing list