Epoch: 1 %define gcj_support 1 # All arches line up except i386 -> x86 %ifarch %{ix86} %define eclipse_arch x86 %else %define eclipse_arch %{_arch} %endif %define major 1 %define minor 3 %define maint 20 Summary: Eclipse Python development plug-in Name: eclipse-pydev Version: %{major}.%{minor}.%{maint} Release: 1%{?dist} License: EPL URL: http://pydev.sourceforge.net Group: Development/Tools Source0: http://downloads.sourceforge.net/pydev/org.python.pydev.feature-src-%{major}_%{minor}_%{maint}.zip Source1: org.python.pydev.mylyn.feature-fetched-src-pydev_1_3_7.tar.bz2 Source2: fetch-pydev-mylyn.sh %if %{gcj_support} BuildRequires: gcc-java >= 4.1.2 BuildRequires: java-1.5.0-gcj-devel >= 1.5.0 Requires(post): java-1.5.0-gcj >= 1.5.0 Requires(postun): java-1.5.0-gcj >= 1.5.0 %else BuildRequires: java-devel >= 1.5.0 %endif Requires: eclipse-jdt Requires: python Requires: commons-codec >= 1.3 Requires: junit >= 3.8.1 Requires: jython >= 2.2 BuildRequires: eclipse-pde # no xmlrpc3 -> no mylyn on ppc64 due to: # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239123 %ifnarch ppc64 BuildRequires: eclipse-mylyn BuildRequires: eclipse-mylyn-ide %endif BuildRequires: jpackage-utils >= 0:1.5 BuildRequires: junit >= 3.8.1 BuildRequires: commons-codec >= 1.3 BuildRequires: jython >= 2.2 %if %{gcj_support} %else BuildArch: noarch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The eclipse-pydev package contains Eclipse plugins for Python development. %prep %setup -q -c tar jxf %{SOURCE1} # remove pre-generated build files find . -name build.xml | xargs rm # remove pre-built jars rm -f plugins/org.python.pydev.core/core.jar rm -f plugins/org.python.pydev.ast/ast.jar rm -f plugins/org.python.pydev.debug/pydev-debug.jar rm -f plugins/org.python.pydev.parser/parser.jar rm -f plugins/org.python.pydev/pydev.jar rm -f plugins/org.python.pydev.jython/pydev-jython.jar rm -f plugins/org.python.pydev.refactoring/refactoring.jar # remove included retroweaver jars as it isn't being used find . -name retroweaver-rt.jar | xargs rm # link to system jars rm -f plugins/org.python.pydev.core/commons-codec.jar ln -sf %{_datadir}/java/jakarta-commons-codec.jar \ plugins/org.python.pydev.core/commons-codec.jar rm -f plugins/org.python.pydev.core/lib/junit.jar ln -sf %{_datadir}/java/junit.jar \ plugins/org.python.pydev.core/junit.jar rm -f plugins/org.python.pydev.jython/jython.jar ln -sf %{_datadir}/java/jython.jar \ plugins/org.python.pydev.jython/jython.jar rm -f plugins/org.python.pydev.refactoring/tests/lib/JFlex.jar # enable when tests are used #ln -sf %{_datadir}/java/jflex.jar \ # plugins/org.python.pydev.refactoring/tests/lib/JFlex.jar rm -f plugins/org.python.pydev.refactoring/tests/lib/xpp3_min-1.1.3.4.O.jar # enable when tests are used #ln -sf %{_datadir}/java/xpp3-minimal.jar \ # plugins/org.python.pydev.refactoring/tests/lib/xpp3_min-1.1.3.4.O.jar rm -f plugins/org.python.pydev.refactoring/tests/lib/xstream-1.2.1.jar # enable when tests are used #ln -sf %{_datadir}/java/xstream.jar \ # plugins/org.python.pydev.refactoring/tests/lib/xstream-1.2.1.jar rm -f plugins/org.python.pydev.refactoring/contrib/ch/hsr/ukistler/astgraph/jgraph.jar %build # Copy the SDK for build /bin/sh -x %{_datadir}/eclipse/buildscripts/copy-platform SDK %{_datadir}/eclipse mylyn SDK=$(cd SDK > /dev/null && pwd) # Eclipse may try to write to the home directory. mkdir home homedir=$(cd home > /dev/null && pwd) # build the main pydev feature java -cp $SDK/startup.jar \ -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \ org.eclipse.core.launcher.Main \ -application org.eclipse.ant.core.antRunner \ -Dtype=feature \ -Did=org.python.pydev.feature \ -DbaseLocation=$SDK \ -DsourceDirectory=$(pwd) \ -DjavacSource=1.5 -DjavacTarget=1.5 \ -DbuildDirectory=$(pwd)/build \ -Dbuilder=%{_datadir}/eclipse/plugins/org.eclipse.pde.build/templates/package-build \ -f %{_datadir}/eclipse/plugins/org.eclipse.pde.build/scripts/build.xml \ -vmargs -Duser.home=$homedir # no xmlrpc3 -> no mylyn on ppc64 due to: # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239123 %ifnarch ppc64 # build the pydev mylyn feature java -cp $SDK/startup.jar \ -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \ org.eclipse.core.launcher.Main \ -application org.eclipse.ant.core.antRunner \ -Dtype=feature \ -Did=org.python.pydev.mylyn.feature \ -DbaseLocation=$SDK \ -DsourceDirectory=$(pwd) \ -DjavacSource=1.5 -DjavacTarget=1.5 \ -DbuildDirectory=$(pwd)/build \ -Dbuilder=%{_datadir}/eclipse/plugins/org.eclipse.pde.build/templates/package-build \ -f %{_datadir}/eclipse/plugins/org.eclipse.pde.build/scripts/build.xml \ -vmargs -Duser.home=$homedir %endif %install rm -rf $RPM_BUILD_ROOT install -d -m755 ${RPM_BUILD_ROOT}/%{_datadir}/eclipse # pydev main feature unzip -q -d $RPM_BUILD_ROOT%{_datadir}/eclipse/.. \ build/rpmBuild/org.python.pydev.feature.zip # no xmlrpc3 -> no mylyn on ppc64 due to: # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239123 %ifnarch ppc64 # pydev mylyn feature unzip -q -d $RPM_BUILD_ROOT%{_datadir}/eclipse/.. \ build/rpmBuild/org.python.pydev.mylyn.feature.zip %endif # deal with linked deps pushd $RPM_BUILD_ROOT%{_datadir}/eclipse/plugins rm -rf org.python.pydev.core_%{version}/commons-codec.jar ln -sf %{_datadir}/java/jakarta-commons-codec.jar \ org.python.pydev.core_%{version}/commons-codec.jar mkdir org.python.pydev.core_%{version}/lib ln -sf %{_datadir}/java/junit.jar \ org.python.pydev.core_%{version}/lib/junit.jar rm -rf org.python.pydev.jython_%{version}/jython.jar ln -sf %{_datadir}/java/jython.jar \ org.python.pydev.jython_%{version}/jython.jar popd %if %{gcj_support} aot-compile-rpm %endif # rename cgi.py's shebang from /usr/local/bin/python to /usr/bin/env python sed -i 's/\/usr\/local\/bin\/python/\/usr\/bin\/env python/' ${RPM_BUILD_ROOT}%{_datadir}/eclipse/plugins/org.python.pydev.jython_%{major}.%{minor}.%{maint}/Lib/cgi.py # convert .py$ files from mode 0644 to mode 0755 chmod 0755 `find ${RPM_BUILD_ROOT} -name '*\.py' -perm 0644 | xargs` # convert '\r\n' end-of-lines to *unix-like '\n' # sed -i 's/\r//' `find ${RPM_BUILD_ROOT} -name '*\.py' | xargs` %clean rm -rf ${RPM_BUILD_ROOT} %if %{gcj_support} %post -p /usr/bin/rebuild-gcj-db %postun -p /usr/bin/rebuild-gcj-db %endif %files %defattr(-,root,root,-) %{_datadir}/eclipse/features/org.python.pydev* %{_datadir}/eclipse/plugins/org.python.pydev_* %{_datadir}/eclipse/plugins/org.python.pydev.ast* %{_datadir}/eclipse/plugins/org.python.pydev.core* %{_datadir}/eclipse/plugins/org.python.pydev.debug* %{_datadir}/eclipse/plugins/org.python.pydev.help* %{_datadir}/eclipse/plugins/org.python.pydev.parser* %{_datadir}/eclipse/plugins/org.python.pydev.templates* %{_datadir}/eclipse/plugins/org.python.pydev.jython* %{_datadir}/eclipse/plugins/org.python.pydev.refactoring* # no xmlrpc3 -> no mylyn on ppc64 due to: # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239123 %ifnarch ppc64 %{_datadir}/eclipse/plugins/org.python.pydev.mylyn* %endif %if %{gcj_support} %{_libdir}/gcj/%{name} %endif %changelog * Tue Aug 30 2008 Michal Nowak 1:1.3.20-1 - bump to 1.3.20 - fixed license tag - created general versioning scheme for version tag & tarball URI) - sed: /usr/local/bin/python -> /usr/bin/env python in Jython's cgi.py - convert .py$ files from mode 0644 to mode 0755 - possibility to convert '\r\n' end-of-lines to *nix-like '\n' in all '.py$' files * Tue May 20 2008 Jeff Johnston 1:1.3.17-1 - Resolves Bugzilla #447455 - 1.3.17 * Fri Feb 01 2008 Jeff Johnston 1:1.3.12-1 - Resolves Bugzilla #431200 - 1.3.12 * Thu Sep 20 2007 Ben Konrath 1:1.3.9-1 - 1.3.9 * Tue Aug 28 2007 Ben Konrath 1:1.3.8-2 - Add pydev mylyn feature to all archs except ppc64. * Fri Aug 24 2007 Ben Konrath 1:1.3.8-1 - 1.3.8 * Fri Apr 27 2007 Igor Foox 1:1.3.1-5 - Add runtime dependancy on the JDT. - Reorganize Requires and BuildRequires. * Mon Apr 02 2007 Andrew Overholt 1:1.3.1-4 - Remove some whitespace, fix lines > 80 characters. - Remove unnecessary rm of junit.jar. - pushd to a deeper directory to fix long lines. - Add missing popd. - Typo in buildroot. * Mon Apr 02 2007 Igor Foox 1:1.3.1-3 - Remove ExclusiveArch. * Sun Apr 01 2007 Igor Foox 1:1.3.1-2 - Add Jython as a BuildRequires and Requires. - Fix buildroot. - Add dist tag. - Remove pkg_summary and eclipse_name macros. - Remove eclipse-jdt and eclipse-pde from BR as they are required by PDE. - Fix permissions on defattr. - Fix long lines. - Renumber and comment patches. - Update and simplify source drop generation comment. * Tue Mar 27 2007 Igor Foox 1:1.3.1-1 - Update to PyDev 1.3.1. * Mon Mar 26 2007 Igor Foox 1:1.3.0-2 - Add dependency on jython. * Sun Mar 25 2007 Igor Foox 1:1.3.0-1 - Update to version 1.3.0. - Update fetch script to include refactoring package. - Fixeup changelog epochs. - Remove #! lines from .py files. * Sat Mar 24 2007 Igor Foox 1:1.2.5-2 - Update to version 1.2.5. - Include Jython functionality again. - Fix spacing issues. - Remove backport to Java 1.4. - Change build method to package-build. - Include script to create the tarball. * Wed Jun 28 2006 Igor Foox 1:1.1.0-1 - Updated to version 1.1.0 (still backported) - Excluded Jython functionality - Removed _fc from version - Indented * Thu Feb 09 2006 Igor Foox 1:1.0.6_fc-1 - Building backported version. * Thu Feb 09 2006 Andrew Overholt 1:0.9.3_fc-14 - Build against 3.1.2. * Fri Dec 16 2005 Andrew Overholt 1:0.9.3_fc-13 - Build against gcc 4.1. * Thu Oct 27 2005 Andrew Overholt 1:0.9.3_fc-12 - Re-build. * Tue Aug 02 2005 Jeff Pound 1:0.9.3_fc-11 - Add patch to make python 2.4 default (bz#164847). * Fri Jul 15 2005 Andrew Overholt 1:0.9.3_fc-10 - Use gbenson's new aot-compile-rpm. * Fri Jul 08 2005 Jeff Pound 1:0.9.3_fc-9 - Fix eclipse build specification to be arch independant. - Fix build.properties javacDebugInfo flag (Robin Green bz#161534) - Add -g compile option (Robin Green bz#161534) * Tue Jul 05 2005 Jeff Pound 1:0.9.3_fc-8 - Apply Robin Greens patch to explicitly specify archive format (bz#162517) - Fix spec file description. * Tue Apr 26 2005 Andrew Overholt 1:0.9.3_fc-7 - Re-organize and make use of scripts. - Remove old tarball from sources. * Tue Apr 26 2005 Jeff Pound 1:0.9.3_fc-6 - Swap zip logic for tarball logic. - Upgrade to 0.9.3. - Remove 3.1 compat patch (included in 0.9.3). * Fri Mar 4 2005 Phil Muldoon 1:0.9.0-4_fc - Added x86_64 to ExclusiveArch * Thu Mar 3 2005 Jeffrey Pound 1:0.9.0-3_fc - Rewrite for native build. - Change gcc4 to gcc. - Add python as requirement. - Remove -g option for gcj. * Tue Feb 08 2005 Jeff Pound 1:0.9.0-1_fc - Initial version