This commit is contained in:
114
ecj.spec
Normal file
114
ecj.spec
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
# spec file for package ecj (Version 3.3)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: ecj
|
||||
%define section free
|
||||
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
|
||||
Version: 3.3
|
||||
Release: 1
|
||||
Summary: Eclipse Compiler for Java
|
||||
Group: Development/Languages/Java
|
||||
License: EPL
|
||||
Url: www.eclipse.org
|
||||
# this tarball is generated by a script that uses the original eclipse sources
|
||||
# script is included for documentation purposes in the docdir of the package
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
# this is the changelog from the original JPackage eclipse package that is
|
||||
# included for documentation and recognition purposes only
|
||||
Source1: eclipse-jpackage-changelog.txt
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if ! %{gcj_support}
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
BuildRequires: ant
|
||||
BuildRequires: jpackage-utils >= 0:1.7
|
||||
%if %{gcj_support}
|
||||
BuildRequires: gcc-java >= 4.0.0
|
||||
Requires: libgcj >= 4.0.0
|
||||
Requires(post): java-gcj-compat
|
||||
Requires(postun): java-gcj-compat
|
||||
%else
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: sed
|
||||
Requires: java
|
||||
%endif
|
||||
%if %defined suse_version
|
||||
BuildRequires: unzip
|
||||
%endif
|
||||
|
||||
%description
|
||||
Eclipse Compiler for Java
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%{__cp} %{SOURCE1} .
|
||||
unset CLASSPATH
|
||||
%if %{gcj_support}
|
||||
for f in `find -name '*.java'`; do
|
||||
gcj -Wno-deprecated -C $f
|
||||
done
|
||||
find . \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' \) \
|
||||
| xargs jar cf %{name}-%{version}.jar
|
||||
%else
|
||||
# remove -Xlint:none from javac compiler arguments as it causes
|
||||
# Sun Java 1.4.2 to crap out
|
||||
%{__sed} -i -e 's,-Xlint:none ,,g' jdtcoresrc/compilejdtcorewithjavac.xml
|
||||
# first invocation builds with javac, second time around with ecj itself
|
||||
ant -f jdtcoresrc/compilejdtcorewithjavac.xml
|
||||
CLASSPATH="`pwd`/jdtcoresrc/%{name}.jar" \
|
||||
ant -f jdtcoresrc/compilejdtcore.xml
|
||||
# just to make sure there is no confusion, delete the bootstrap ecj jar
|
||||
%{__rm} jdtcoresrc/%{name}.jar
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
%{__mkdir_p} ${RPM_BUILD_ROOT}%{_javadir}
|
||||
%{__install} -m 0644 %{name}.jar \
|
||||
${RPM_BUILD_ROOT}%{_javadir}/%{name}-%{version}.jar
|
||||
pushd ${RPM_BUILD_ROOT}%{_javadir}
|
||||
%{__ln_s} %{name}-%{version}.jar %{name}.jar
|
||||
popd
|
||||
%if %{gcj_support}
|
||||
aot-compile-rpm
|
||||
%endif
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
%if %{gcj_support}
|
||||
|
||||
%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
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc eclipse-jpackage-changelog.txt %{name}-tarballBuild.sh
|
||||
%{_javadir}/%{name}-%{version}.jar
|
||||
%{_javadir}/%{name}.jar
|
||||
%if %{gcj_support}
|
||||
%{_libdir}/gcj/%{name}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Nov 22 2007 - anosek@suse.cz
|
||||
- new package, initial version 3.3
|
Reference in New Issue
Block a user