%define eclipse_base %{_libdir}/eclipse %define gcj_support 1 %define rlsdate 200809292108 Summary: AnyEdit plugin for eclipse Name: eclipse-anyedit Version: 2.1.1 Release: 3%{?dist} License: BSD Group: Development/Tools URL: http://andrei.gmxhome.de/anyedit/index.html Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Source0: http://andrei.gmxhome.de/eclipse/plugins/de.loskutov.anyedit.AnyEditTools_%{version}.%{rlsdate}.jar Source1: assemble.xml Source2: package.xml Source3: LICENSE # work around unicode/compiler issue Patch0: eclipse-anyedit-%{version}-unicode.patch Requires: eclipse-platform >= 3.3 BuildRequires: jpackage-utils >= 0:1.5 BuildRequires: eclipse-pde %if %{gcj_support} BuildRequires: java-gcj-compat-devel >= 1.0.33 Requires(post): java-gcj-compat >= 1.0.33 Requires(postun): java-gcj-compat >= 1.0.33 %else BuildRequires: java-devel >= 1.4.2 BuildArch: noarch %endif %description The AnyEdit plugin adds several new actions to the context menu of text-based Eclipse editors. %prep %setup -q -c %patch0 -p1 # remove pre-compiled classes rm -rf de # install license install -m 644 %{SOURCE3} LICENSE %build # See comments in the script to understand this. %if 0%{?rhel} == 5 /bin/sh -x %{_libdir}/eclipse/buildscripts/copy-platform SDK %{eclipse_base} %else /bin/sh -x %{eclipse_base}/buildscripts/copy-platform SDK %{eclipse_base} %endif SDK=$(cd SDK > /dev/null && pwd) # Eclipse may write preferences and logs here mkdir home homedir=$(cd home > /dev/null && pwd) # create the required assemble and package targets mkdir $(pwd)/build/ # this symlink creates the assemble target which assembles the plugin ln -s %{SOURCE1} $(pwd)/build/assemble.de.loskutov.anyedit.AnyEditTools.all.xml # this symlink creates the package target which packages the plugin ln -s %{SOURCE2} $(pwd)/build/package.de.loskutov.anyedit.AnyEditTools.all.xml # find correct location package_build=$(find %{eclipse_base} -name 'package-build' -print | grep pde | grep templates) build_xml=$(find %{eclipse_base} -name 'build.xml' -print | grep pde | grep scripts) # build the plugin eclipse \ -nosplash \ -application org.eclipse.ant.core.antRunner \ -Dtype=plugin \ -Did=de.loskutov.anyedit.AnyEditTools \ -DbaseLocation=$SDK \ -DsourceDirectory=$(pwd) \ -DbuildDirectory=$(pwd)/build \ -Dbuilder=$package_build \ -f $build_xml \ -vmargs -Duser.home=$homedir %install rm -rf %{buildroot} # create plugins directory install -d -m 755 %{buildroot}/%{eclipse_base}/dropins/anyedit/plugins # install plugin install -m 644 de.loskutov.anyedit.AnyEditTools_%{version}.%{rlsdate}.jar \ %{buildroot}/%{eclipse_base}/dropins/anyedit/plugins %if %{gcj_support} %{_bindir}/aot-compile-rpm %endif %clean rm -rf %{buildroot} %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,-) %{eclipse_base}/dropins/anyedit/plugins/de.loskutov.anyedit.AnyEditTools_%{version}.%{rlsdate}.jar %doc LICENSE %if %{gcj_support} %attr(-,root,root) %{_libdir}/gcj/%{name} %endif %changelog * Wed Oct 15 2008 Rob Myers 2.1.1-3 - move plugin to dropins * Sun Oct 12 2008 Rob Myers 2.1.1-2 - use build.update.jar package target - update Requires for compatible versions of eclipse * Sat Oct 11 2008 Rob Myers 2.1.1-1 - update to 2.1.1 * Wed Oct 17 2007 Rob Myers 1.8.2-5 - install as jar instead of zip * Tue Oct 16 2007 Rob Myers 1.8.2-4 - rebuild * Tue Sep 25 2007 Rob Myers 1.8.2-3 - update to meet http://fedoraproject.org/wiki/PackagingDrafts/EclipsePlugins * Thu Sep 13 2007 Rob Myers 1.8.2-2 - update defattr settings from alcapcom * Fri Sep 7 2007 Rob Myers 1.8.2-1 - update to 1.8.2 - update unicode patch for IcedTea compatibility * Sun May 27 2007 Rob Myers 1.8.0-2 - enable gcj_support and rebuild * Fri May 18 2007 Rob Myers 1.8.0-1 - Update to 1.8.0 - switch to pde build - add gcj_support - work around 'Ü' compiler issue - add license * Mon Apr 23 2007 Patrick Neely 1.7.0-0 - Update to 1.7.0 for RHEL5 * Tue Jun 27 2006 Patrick Neely 1.4.1-0 - Rebuilt for RHEL4