%global bootstrap 0 %global sha df2c3591ae0e641a8d12c13ca9c1058eaf8439b2 %if %{bootstrap} %global snap %{nil} %else %global snap -SNAPSHOT %endif Name: tycho Version: 0.16.0 Release: 1.df2c35%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven Group: Development/Libraries # license file is missing but all files having some licensing information are ASL 2.0 License: ASL 2.0 URL: http://tycho.sonatype.org/ Source0: http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-%{sha}.tar.bz2 # this is a workaround for maven-plugin-plugin changes that happened after # version 2.4.3 (impossible to have empty mojo created as aggregate). This # should be fixed upstream properly Source1: EmptyMojo.java # we need to make sure we are using maven 3 deps Source2: depmap.xml Source3: copy-platform-all Patch0: %{name}-fix-build.patch Patch1: %{name}-fix-surefire.patch # Upstream builds against maven-surefire 2.10 but in rawhide we have 2.12 Patch2: %{name}-maven-surefire.patch Patch3: %{name}-use-custom-resolver.patch # Set some temporary build version so that the bootstrapped build has # a different version from the nonbootstrapped. Otherwise there will # be cyclic dependencies. Patch4: %{name}-bootstrap.patch BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: maven BuildRequires: maven-clean-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-dependency-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-release-plugin BuildRequires: maven-resources-plugin BuildRequires: maven-shared-verifier BuildRequires: maven-shared-osgi BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit BuildRequires: maven-surefire-provider-junit4 BuildRequires: maven-verifier-plugin BuildRequires: plexus-containers-component-metadata BuildRequires: eclipse-jdt BuildRequires: decentxml BuildRequires: %{name} Requires: jpackage-utils Requires: decentxml Requires: maven Requires: maven-clean-plugin Requires: maven-dependency-plugin 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 plugins and OSGI bundles with Maven. Eclipse plugins and OSGI bundles have their own metadata for expressing dependencies, source folder locations, etc. that are normally found in a Maven POM. Tycho uses native metadata for Eclipse plugins and OSGi bundles and uses the POM to configure and drive the build. Tycho supports bundles, fragments, features, update site projects and RCP applications. Tycho also knows how to run JUnit test plugins using OSGi runtime and there is also support for sharing build results using Maven artifact repositories. Tycho plugins introduce new packaging types and the corresponding lifecycle bindings that allow Maven to use OSGi and Eclipse metadata during a Maven build. OSGi rules are used to resolve project dependencies and package visibility restrictions are honored by the OSGi-aware JDT-based compiler plugin. Tycho will use OSGi metadata and OSGi rules to calculate project dependencies dynamically and injects them into the Maven project model at build time. Tycho supports all attributes supported by the Eclipse OSGi resolver (Require-Bundle, Import-Package, Eclipse-GenericRequire, etc). Tycho will use proper classpath access rules during compilation. Tycho supports all project types supported by PDE and will use PDE/JDT project metadata where possible. One important design goal in Tycho is to make sure there is no duplication of metadata between POM and OSGi metadata. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q -n org.eclipse.tycho-%{sha} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %if %{bootstrap} %patch4 -p1 %endif find tycho-core -iname '*html' -delete # place empty mojo in place mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject pushd tycho-maven-plugin/src/main/java/org/fedoraproject cp %{SOURCE1} . popd %build export MAVEN_OPTS="$MAVEN_OPTS -XX:MaxPermSize=256m" mvn-rpmbuild -Dmaven.local.depmap.file=%{SOURCE2} -Dmaven.test.skip=true install javadoc:aggregate %install mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name} install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} 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} \ tycho-p2/tycho-p2-{facade,plugin,{director,publisher,repository}-plugin} \ tycho-{maven,packaging,pomgenerator,release/tycho-versions,source}-plugin \ tycho-bundles/org* \ tycho-surefire/{tycho-surefire-plugin,org.eclipse.tycho.surefire.{osgibooter,junit,junit4{,7}}}; do echo $mod 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 done for pommod in tycho-p2 tycho-bundles{,/org.eclipse.tycho.p2.resolver.impl} \ 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 done # 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 popd 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 # 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 %postun %update_maven_depmap %files %{_mavenpomdir}/* %{_mavendepmapfragdir}/%{name} %{_javadir}/%{name}/ %doc README.md %files javadoc %{_javadocdir}/%{name} %changelog * Thu Aug 2 2012 Roland Grunberg 0.16.0-1.df2c35 - Update to 0.16.0 SNAPSHOT. * Tue Jul 31 2012 Roland Grunberg 0.15.0-3 - Non-bootstrap build. * Tue Jul 31 2012 Roland Grunberg 0.15.0-2.1 - Ignore defined environments in local mode. * Mon Jul 30 2012 Roland Grunberg 0.15.0-2 - Non-bootstrap build. * Mon Jul 30 2012 Roland Grunberg 0.15.0-1.1 - Fix copy-platform-all script to properly link %%{_datadir}/eclipse jars. * Thu Jul 26 2012 Roland Grunberg 0.15.0-1 - Update to 0.15.0. - Set BREE to at least JavaSE-1.6 for Eclipse feature bundles. * Wed Jul 25 2012 Roland Grunberg 0.14.1-7 - Non-bootstrap build. * Mon Jul 23 2012 Roland Grunberg 0.14.1-6 - Detect OSGi jars using presence of Bundle-SymbolicName entry (BZ #838513). * Sun Jul 22 2012 Fedora Release Engineering - 0.14.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jun 11 2012 Roland Grunberg 0.14.1-5 - Non-bootstrap build. * Tue May 29 2012 Roland Grunberg 0.14.1-4.1 - Fix Tycho Surfire to run Eclipse test bundles. - Implement automatic creation of a system p2 repository. - Allow building SWT fragments (BZ #380934). * Wed May 23 2012 Roland Grunberg 0.14.1-4 - Non-bootstrap build. * Thu May 17 2012 Roland Grunberg 0.14.1-3.1 - Set BREE to be at least JavaSE-1.6 for Eclipse OSGi bundles. * Wed May 16 2012 Roland Grunberg 0.14.1-3 - Non-bootstrap build. * Wed Apr 25 2012 Roland Grunberg 0.14.1-2.1 - Implement a custom resolver when running in local mode. - Use upstream solution for BZ #372395 to fix the build. * Wed Apr 4 2012 Roland Grunberg 0.14.1-2 - Non-bootstrap build. * Tue Mar 27 2012 Roland Grunberg 0.14.1-1.1 - Add missing tycho-testing-harness to be packaged. - Use %%{_eclipse_base} from eclipse-platform. * Fri Mar 9 2012 Roland Grunberg 0.14.1-1 - Update to 0.14.1 upstream tag. - Allow building against maven-surefire 2.12 (instead of 2.10). - Stop symlinking o.e.osgi and o.e.jdt.core into the m2 cache. * Thu Feb 16 2012 Roland Grunberg 0.14.0-4 - Non-bootstrap build. * Tue Feb 14 2012 Roland Grunberg 0.14.0-3 - Update to 0.14.0 upstream tag. * Thu Feb 9 2012 Roland Grunberg 0.14.0-2 - Non-bootstrap build. * Wed Feb 01 2012 Roland Grunberg - 0.14.0-1 - Update to 0.14.0. * Sat Jan 14 2012 Fedora Release Engineering - 0.10.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Fri May 27 2011 Stanislav Ochotnicky - 0.12.0-0.1.a74b1717 - Update to new version do bootstrap from scratch * Fri May 6 2011 Alexander Kurtakov 0.10.0-3 - Non-bootstrap build. * Tue May 3 2011 Stanislav Ochotnicky - 0.10.0-2 - Add README and make build more silent * Tue Mar 29 2011 Stanislav Ochotnicky - 0.10.0-1 - First bootstrapped version