123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- %define qualifier 201006080911
- Summary: Eclipse Compiler for Java
- Name: ecj
- Version: 3.6
- Release: 1%{?_dist_release}
- URL: http://www.eclipse.org
- License: EPL
- Group: Development/Languages
- #Source0: ftp://sourceware.org/pub/java/ecj-latest.jar
- #Source1: ecj-gij.sh.in
- Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{qualifier}/%{name}src-%{version}.zip
- Source1: ecj.sh.in
- # Use ECJ for GCJ
- # cvs -d:pserver:anonymous@sourceware.org:/cvs/rhug co eclipse-gcj
- # tar cjf ecj-gcj.tar.bz2 eclipse-gcj
- Source2: %{name}-gcj.tar.bz2
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- #BuildArch: noarch
- BuildRequires: jpackage-utils
- BuildRequires: gcc-java >= 4.0.0
- BuildRequires: fastjar
- # for /usr/bin/aot-compile-rpm
- BuildRequires: java-gcj-compat-devel
- Requires: libgcj >= 4.0.0
- # for /usr/bin/rebuild-gcj-db
- Requires(post): java-gcj-compat
- Requires(postun): java-gcj-compat
- Provides: eclipse-ecj = %{version}-%{release}
- #Obsoletes: eclipse-ecj < 3.4.2-4
- %description
- ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
- the JDT Core batch compiler.
- %prep
- %setup -q -c
- # Use ECJ for GCJ's bytecode compiler
- tar jxf %{SOURCE2}
- mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java \
- org/eclipse/jdt/internal/compiler/batch/
- cat eclipse-gcj/gcc.properties >> \
- org/eclipse/jdt/internal/compiler/batch/messages.properties
- rm -rf eclipse-gcj
- # Remove bits of JDT Core we don't want to build
- rm -r org/eclipse/jdt/internal/compiler/tool
- rm -r org/eclipse/jdt/internal/compiler/apt
- # JDTCompilerAdapter isn't used by the batch compiler
- rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
- %build
- for f in `find -name '*.java' | cut -c 3- | LC_ALL=C sort`; do
- gcj -Wno-deprecated -C $f
- done
- find -name '*.class' -or -name '*.properties' -or -name '*.rsc' |\
- xargs fastjar cf %{name}-%{version}.jar
- %install
- rm -rf $RPM_BUILD_ROOT
- rm -rf aot-compile-rpm
- mkdir -p $RPM_BUILD_ROOT%{_javadir}
- #install -m644 %{SOURCE0} $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
- install -m644 *.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
- pushd $RPM_BUILD_ROOT%{_javadir}
- ln -s %{name}-%{version}.jar %{name}.jar
- ln -s %{name}-%{version}.jar eclipse-%{name}-%{version}.jar
- ln -s eclipse-%{name}-%{version}.jar eclipse-%{name}.jar
- ln -s %{name}-%{version}.jar jdtcore.jar
- popd
- # Install the ecj wrapper script
- install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj
- sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj
- aot-compile-rpm
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- if [ -x %{_bindir}/rebuild-gcj-db ]
- then
- %{_bindir}/rebuild-gcj-db
- fi
- %postun
- if [ -x %{_bindir}/rebuild-gcj-db ]
- then
- %{_bindir}/rebuild-gcj-db
- fi
- %files
- %defattr(-,root,root,-)
- %{_bindir}/%{name}
- %{_javadir}/%{name}*.jar
- %{_javadir}/eclipse-%{name}*.jar
- %{_javadir}/jdtcore.jar
- %{_libdir}/gcj/%{name}
- %changelog
- * Tue Aug 24 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.6.0-1
- - new upstream release
- - enabled AOT compile
- * Mon Apr 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.1-1
- - initial build for Vine Linux
|