ecj-vl.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. %define srcver 4.4
  2. %define qualifier 201406061215
  3. Summary: Eclipse Compiler for Java
  4. Name: ecj
  5. Version: %{srcver}.0
  6. Release: 1%{?_dist_release}
  7. URL: http://www.eclipse.org
  8. License: EPL
  9. Group: Development/Languages
  10. #Source0: ftp://sourceware.org/pub/java/ecj-latest.jar
  11. #Source1: ecj-gij.sh.in
  12. Source0: http://download.eclipse.org/eclipse/downloads/drops4/R-%{srcver}-%{qualifier}/%{name}src-%{srcver}.jar
  13. Source1: ecj.sh.in
  14. Source3: ecj-4.4.pom
  15. Source4: ecj.1
  16. Source5: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
  17. # Always generate debug info when building RPMs (Andrew Haley)
  18. Patch0: %{name}-rpmdebuginfo.patch
  19. # build.xml fails to include a necessary .props file in the built ecj.jar
  20. Patch1: %{name}-include-props.patch
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildArch: noarch
  23. BuildRequires: ant
  24. BuildRequires: gzip
  25. BuildRequires: java-1.7.0-openjdk-devel
  26. Requires: java-headless
  27. Requires: jpackage-utils
  28. Provides: eclipse-ecj = %{version}-%{release}
  29. %description
  30. ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
  31. the JDT Core batch compiler.
  32. %prep
  33. %setup -q -c
  34. %patch0 -p1
  35. %patch1 -b .sav
  36. sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
  37. sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
  38. cp %{SOURCE3} pom.xml
  39. mkdir -p scripts/binary/META-INF/
  40. cp %{SOURCE5} scripts/binary/META-INF/MANIFEST.MF
  41. # JDTCompilerAdapter isn't used by the batch compiler
  42. rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
  43. cp %{SOURCE4} ecj.1
  44. %build
  45. ant
  46. gzip ecj.1
  47. %install
  48. mkdir -p $RPM_BUILD_ROOT%{_javadir}
  49. cp -a *.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
  50. pushd $RPM_BUILD_ROOT%{_javadir}
  51. ln -s %{name}.jar eclipse-%{name}.jar
  52. ln -s %{name}.jar jdtcore.jar
  53. popd
  54. # Install the ecj wrapper script
  55. install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj
  56. sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj
  57. # Install manpage
  58. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
  59. install -m 644 -p ecj.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/ecj.1.gz
  60. # poms
  61. install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
  62. install -pm 644 pom.xml \
  63. $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
  64. %clean
  65. rm -rf $RPM_BUILD_ROOT
  66. %files
  67. %doc about.html
  68. %{_mavenpomdir}/JPP-%{name}.pom
  69. %{_bindir}/%{name}
  70. %{_javadir}/%{name}.jar
  71. %{_javadir}/eclipse-%{name}.jar
  72. %{_javadir}/jdtcore.jar
  73. %{_mandir}/man1/ecj.1.gz
  74. %changelog
  75. * Sun Jul 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.4.0-1
  76. - new upstream release.
  77. * Sun Mar 20 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.6.2-1
  78. - new upstream release
  79. * Tue Aug 24 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.6.0-1
  80. - new upstream release
  81. - enabled AOT compile
  82. * Mon Apr 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.5.1-1
  83. - initial build for Vine Linux