[eclipse-pdt/f21] Unzip feature bundles on installation Add dep on commons-lang Add appdata addon metadata Drop mylyn

Mat Booth mbooth at fedoraproject.org
Tue Sep 23 16:01:57 UTC 2014


commit be173b6fe0cef69b7f11775bb34fb1915e1d452b
Author: Mat Booth <mat.booth at redhat.com>
Date:   Tue Sep 23 14:20:59 2014 +0100

    Unzip feature bundles on installation
    Add dep on commons-lang
    Add appdata addon metadata
    Drop mylyn sub-package, just install it with main package -- simplifies
    the spec a little a bit, and because mylyn is an optional dep, the
    mylyn parts of PDT will just magically start working when the user
    installs mylyn. This means that the user doesn't have to know that
    a pdt-mylyn subpackage exists to benefit from its features.

 eclipse-pdt.metainfo.xml |   12 ++++++++++
 eclipse-pdt.spec         |   55 +++++++++++++++++++++++++---------------------
 2 files changed, 42 insertions(+), 25 deletions(-)
---
diff --git a/eclipse-pdt.metainfo.xml b/eclipse-pdt.metainfo.xml
new file mode 100644
index 0000000..ddc2986
--- /dev/null
+++ b/eclipse-pdt.metainfo.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 Mat Booth <mat.booth at redhat.com> -->
+<component type="addon">
+ <id>eclipse-pdt</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>EPL-1.0</project_license>
+ <name>PDT</name>
+ <summary>PHP development tools</summary>
+ <extends>eclipse.desktop</extends>
+ <url type="homepage">http://www.eclipse.org/pdt/</url>
+ <updatecontact>mat.booth at redhat.com</updatecontact>
+</component>
diff --git a/eclipse-pdt.spec b/eclipse-pdt.spec
index 54ca502..6d4eb8e 100644
--- a/eclipse-pdt.spec
+++ b/eclipse-pdt.spec
@@ -3,7 +3,7 @@
 
 Name:      eclipse-pdt
 Version:   3.3.1
-Release:   1%{?dist}
+Release:   2%{?dist}
 Summary:   PHP Development Tools (PDT) Eclipse plug-in
 License:   EPL
 URL:       http://www.eclipse.org/pdt/
@@ -16,6 +16,9 @@ Source0:   http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/snapshot/org.eclipse
 #   $ tar -czf code_gen.tar.gz $(find -name ParserConstants.java -o -name PhpAstLexer.java -o -name PhpAstParser.java -o -name DocumentorLexer.java -o -name CompilerAstParser.java -o -name CompilerParserConstants.java -o -name CompilerAstParser.java -o -name PHPTokenizer.java -o -name PhpLexer.java)
 Source1:   code_gen.tar.gz
 
+# Appdata addon metadata
+Source2:   eclipse-pdt.metainfo.xml
+
 BuildArch:        noarch
 
 BuildRequires:    eclipse-pde
@@ -32,6 +35,10 @@ BuildRequires:    xorg-x11-server-Xvfb
 Requires:         php
 Requires:         php-pecl-xdebug
 
+# Added in F21
+Obsoletes:        %{name}-mylyn < %{version}-%{release}
+Provides:         %{name}-mylyn = %{version}-%{release}
+
 %description
 The PHP IDE project delivers a PHP Integrated Development Environment
 framework for the Eclipse platform. This project encompasses the development
@@ -39,19 +46,10 @@ components necessary to develop PHP-based Web Applications and facilitates
 extensibility. It leverages the existing Web Tools Project in providing
 developers with PHP capabilities.
 
-%package   mylyn
-Summary:   Mylyn integration for Eclipse PDT projects
-Requires:  %{name} = %{version}-%{release}
-
-%description mylyn
-Mylyn task-focused UI integration for Eclipse PHP Development Tools (PDT)
-projects.
-
 %package   sdk
 Summary:   Eclipse PDT SDK
 Requires:  eclipse-pde
-Requires:  %{name}       = %{version}-%{release}
-Requires:  %{name}-mylyn = %{version}-%{release}
+Requires:  %{name} = %{version}-%{release}
 
 %description sdk
 Documentation and source for the Eclipse PHP Development Tools (PDT).
@@ -81,21 +79,15 @@ find -name '*.jar' -exec rm -f '{}' \;
 # Skip code generation
 %pom_remove_plugin :maven-antrun-plugin plugins/org.eclipse.php.core
 
-# Make sure mylyn is included in auto-generated package requires
-sed -i -e 's@;resolution:=optional@@g' plugins/org.eclipse.php.mylyn.ui/META-INF/MANIFEST.MF
-
 # Add java_cup as an OSGi dep instead of bundling
 echo "Require-Bundle: java_cup" >> plugins/org.eclipse.php.core.parser/META-INF/MANIFEST.MF
 
 %build
-pushd org.eclipse.pdt.releng
-xvfb-run xmvn -o clean verify
-popd
+xvfb-run xmvn -o clean verify -f org.eclipse.pdt.releng/pom.xml
 
 %install
 install -d -m 755 %{buildroot}%{eclipse_dropin}/pdt-tests/eclipse/{plugins,features}
 install -d -m 755 %{buildroot}%{eclipse_dropin}/pdt-sdk/eclipse/{plugins,features}
-install -d -m 755 %{buildroot}%{eclipse_dropin}/pdt-mylyn/eclipse/{plugins,features}
 install -d -m 755 %{buildroot}%{eclipse_dropin}/pdt/eclipse/{plugins,features}
 
 pushd dev/org.eclipse.php-repository/target/repository
@@ -105,22 +97,29 @@ mv features/org.eclipse.php*test* %{buildroot}%{eclipse_dropin}/pdt-tests/eclips
 mv plugins/org.eclipse.php*source* %{buildroot}%{eclipse_dropin}/pdt-sdk/eclipse/plugins
 mv features/org.eclipse.php*source* %{buildroot}%{eclipse_dropin}/pdt-sdk/eclipse/features
 
-mv plugins/org.eclipse.php*mylyn* %{buildroot}%{eclipse_dropin}/pdt-mylyn/eclipse/plugins
-mv features/org.eclipse.php*mylyn* %{buildroot}%{eclipse_dropin}/pdt-mylyn/eclipse/features
-
 mv plugins/org.eclipse.php* %{buildroot}%{eclipse_dropin}/pdt/eclipse/plugins
 mv features/org.eclipse.php* %{buildroot}%{eclipse_dropin}/pdt/eclipse/features
 popd
 
+# Unzip features
+pushd %{buildroot}%{eclipse_dropin}
+for f in $( ls pdt*/eclipse/features/* ) ; do
+ dirname=${f%.jar}
+ mkdir -p $dirname
+ unzip $f -d $dirname
+ rm $f
+done
+popd
+
 # Symlinks for system deps
 ln -s $(build-classpath java_cup) %{buildroot}/%{eclipse_dropin}/pdt/eclipse/plugins/java_cup.jar
+ln -s $(build-classpath commons-lang) %{buildroot}/%{eclipse_dropin}/pdt/eclipse/plugins/commons-lang.jar
+
+install -D %{SOURCE2} %{buildroot}%{_datadir}/appdata/eclipse-pdt.metainfo.xml
 
 %files
 %{eclipse_dropin}/pdt
-%doc features/org.eclipse.php-feature/*.html
-
-%files mylyn
-%{eclipse_dropin}/pdt-mylyn
+%{_datadir}/appdata/eclipse-pdt.metainfo.xml
 %doc features/org.eclipse.php-feature/*.html
 
 %files sdk
@@ -132,6 +131,12 @@ ln -s $(build-classpath java_cup) %{buildroot}/%{eclipse_dropin}/pdt/eclipse/plu
 %doc features/org.eclipse.php-feature/*.html
 
 %changelog
+* Tue Sep 23 2014 Mat Booth <mat.booth at redhat.com> - 3.3.1-2
+- Unzip feature bundles on installation
+- Add dep on commons-lang
+- Add appdata addon metadata
+- Drop mylyn sub-package, just install it with main package
+
 * Mon Sep 22 2014 Mat Booth <mat.booth at redhat.com> - 3.3.1-1
 - Update to latest upstream
 - Drop unneeded patch


More information about the scm-commits mailing list