Update to 4.4.2.

- Install with mvn_install
- Add jetty.orbit alias
- Add compiler.apt aliases
- Drop ancient obsoletes/provides on eclipse-ecj
- Use man page from upstream source
This commit is contained in:
Mat Booth 2015-03-30 15:36:18 +01:00
parent e9c278fde8
commit c596c8034d
4 changed files with 39 additions and 65 deletions

12
.gitignore vendored
View File

@ -1,6 +1,6 @@
ecj-gcj.tar.bz2 /noarch
ecjsrc-4.2.1.jar /.build-*.log
/ecj.1 /*.src.rpm
/ecjsrc-I20140430-2000.jar /ecj-*.pom
/ecjsrc-4.4.jar /ecj-*/
/ecjsrc-4.4.1.jar /ecjsrc-*.jar

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!--
Originally downloaded here:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.4-201406061215/#JDTCORE
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.4.1</version>
<packaging>jar</packaging>
<name>Eclipse ECJ</name>
<description>Eclipse JDT Core Batch Compiler</description>
<url>http://www.eclipse.org/jdt/</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<licenses>
<license>
<name>Eclipse Public License v1.0</name>
<url>http://www.eclipse.org/org/documents/epl-v10.php</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>

View File

@ -1,21 +1,19 @@
Epoch: 1 Epoch: 1
%global qualifier R-4.4.1-201409250400 %global qualifier R-4.4.2-201502041700
Summary: Eclipse Compiler for Java Summary: Eclipse Compiler for Java
Name: ecj Name: ecj
Version: 4.4.1 Version: 4.4.2
Release: 1%{?dist} Release: 1%{?dist}
URL: http://www.eclipse.org URL: http://www.eclipse.org
License: EPL License: EPL
Group: Development/Languages
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/%{name}src-%{version}.jar Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}.jar
Source1: ecj.sh.in Source1: ecj.sh.in
#Patched from http://central.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom Source3: https://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/%{version}/ecj-%{version}.pom
# No dependencies are needed for ecj, dependencies are for using of jdt.core which makes no sense outside of eclipse Source4: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
Source3: ecj-4.4.1.pom
Source4: ecj.1
Source5: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
# Always generate debug info when building RPMs (Andrew Haley) # Always generate debug info when building RPMs (Andrew Haley)
Patch0: %{name}-rpmdebuginfo.patch Patch0: %{name}-rpmdebuginfo.patch
# build.xml fails to include a necessary .props file in the built ecj.jar # build.xml fails to include a necessary .props file in the built ecj.jar
@ -25,10 +23,7 @@ BuildArch: noarch
BuildRequires: gzip BuildRequires: gzip
BuildRequires: ant BuildRequires: ant
BuildRequires: java-devel >= 1:1.7.0 BuildRequires: javapackages-local
Provides: eclipse-ecj = %{epoch}:%{version}-%{release}
Obsoletes: eclipse-ecj < 1:3.4.2-4
Obsoletes: %{name}-native < 1:4.2.1-10 Obsoletes: %{name}-native < 1:4.2.1-10
@ -46,23 +41,29 @@ sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
cp %{SOURCE3} pom.xml cp %{SOURCE3} pom.xml
mkdir -p scripts/binary/META-INF/ mkdir -p scripts/binary/META-INF/
cp %{SOURCE5} scripts/binary/META-INF/MANIFEST.MF cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
# JDTCompilerAdapter isn't used by the batch compiler # JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
cp %{SOURCE4} ecj.1
# No dep on ant needed
%pom_remove_dep org.apache.ant:ant
# Symlinks and aliases
%mvn_file :ecj ecj eclipse-ecj jdtcore
%mvn_alias org.eclipse.jdt.core.compiler:ecj \
org.eclipse.jdt:org.eclipse.jdt.core org.eclipse.jdt:org.eclipse.jdt.compiler.apt \
org.eclipse.tycho:org.eclipse.jdt.core org.eclipse.tycho:org.eclipse.jdt.compiler.apt \
org.eclipse.jetty.orbit:org.eclipse.jdt.core \
org.eclipse.jdt:core
%build %build
ant ant
gzip ecj.1 gzip ecj.1
%install %install
mkdir -p $RPM_BUILD_ROOT%{_javadir} %mvn_artifact pom.xml ecj.jar
cp -a *.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar %mvn_install
pushd $RPM_BUILD_ROOT%{_javadir}
ln -s %{name}.jar eclipse-%{name}.jar
ln -s %{name}.jar jdtcore.jar
popd
# Install the ecj wrapper script # Install the ecj wrapper script
install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj
@ -72,21 +73,20 @@ sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 -p ecj.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/ecj.1.gz install -m 644 -p ecj.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/ecj.1.gz
# poms
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.jdt:core,org.eclipse.jdt:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar
%files -f .mfiles %files -f .mfiles
%doc about.html %doc about.html
%{_bindir}/%{name} %{_bindir}/ecj
%{_javadir}/eclipse-%{name}.jar
%{_javadir}/jdtcore.jar
%{_mandir}/man1/ecj.1.gz %{_mandir}/man1/ecj.1.gz
%changelog %changelog
* Mon Mar 30 2015 Mat Booth <mat.booth@redhat.com> - 1:4.4.2-1
- Update to 4.4.2.
- Install with mvn_install
- Add jetty.orbit alias
- Add compiler.apt aliases
- Drop ancient obsoletes/provides on eclipse-ecj
- Use man page from upstream source
* Thu Jan 8 2015 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.1-1 * Thu Jan 8 2015 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.1-1
- Update to 4.4.1. - Update to 4.4.1.

View File

@ -1,2 +1,2 @@
96d507a301eeb8454299a325a9aca31d ecj.1 bfa9fe02f1123d7ec1fe020e8921d87a ecj-4.4.2.pom
7bf1576a4cf33f95091f8777bdada580 ecjsrc-4.4.1.jar 212445012540363e8b4a702c59ec9a43 ecjsrc-4.4.2.jar