diff --git a/tycho.spec b/tycho.spec index 9c3e1d5..01ef79b 100644 --- a/tycho.spec +++ b/tycho.spec @@ -69,9 +69,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 @@ -135,6 +132,8 @@ mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} -Dmaven.test.skip=true install 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-{artifactcomparator,core,embedder-api,metadata-model,testing-harness} \ sisu-equinox/sisu-equinox{-api,-launching,-embedder} \ @@ -146,54 +145,41 @@ 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" -# standalone p2 +# standalone p2 director pushd .m2/org/eclipse/tycho/tycho-standalone-p2-director/%{version}*/ - install -m 644 tycho-standalone-p2-director-%{version}*.zip %{buildroot}%{_javadir}/%{name}/tycho-standalone-p2-director.zip - - sed -i -e "s/eclipse-repository/pom/" tycho-standalone-p2-director-%{version}*.pom - install -pm 644 tycho-standalone-p2-director-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.tycho-%{name}-standalone-p2-director.pom +install -m 644 tycho-standalone-p2-director-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-standalone-p2-director.zip +install -pm 644 tycho-standalone-p2-director-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-standalone-p2-director.pom popd - -%add_maven_depmap JPP.tycho-%{name}-standalone-p2-director.pom tycho/tycho-standalone-p2-director.zip -a "org.eclipse.tycho:tycho-standalone-p2-director,org.sonatype.tycho:tycho-standalone-p2-director" +%add_maven_depmap JPP.%{name}-tycho-standalone-p2-director.pom tycho/tycho-standalone-p2-director.zip -a "org.eclipse.tycho:tycho-standalone-p2-director,org.sonatype.tycho:tycho-standalone-p2-director" # 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}/* @@ -207,6 +193,7 @@ install -pm 755 %{SOURCE3} %{buildroot}%{_javadir}/%{name}/copy-platform-all %changelog * Mon Aug 13 2012 Roland Grunberg 0.16.0-4.1.df2c35 - Correctly reference objectweb-asm4 and fix local mode resolution bug. +- Update spec file to honour new java packaging guidelines. * Thu Aug 9 2012 Roland Grunberg 0.16.0-4.df2c35 - Non-bootstrap build.