Blame SPECS/eclipse-pydev.spec

41b21e
%{?scl:%scl_package eclipse-pydev}
41b21e
%{!?scl:%global pkg_name %{name}}
41b21e
%{?java_common_find_provides_and_requires}
41b21e
41b21e
# Turn off the brp-python-bytecompile script
41b21e
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-scl-python-bytecompile[[:space:]].*$!!g')
41b21e
dc00b4
%global release_version 4_5_5
dc00b4
dc00b4
%if 0%{?fedora} >= 24
dc00b4
%global droplets droplets
dc00b4
%else
dc00b4
%global droplets dropins
dc00b4
%endif
dc00b4
41b21e
Epoch: 1
41b21e
Summary: Eclipse Python development plug-in
41b21e
Name:    %{?scl_prefix}eclipse-pydev
dc00b4
Version:          4.5.5
dc00b4
Release:          1.1%{?dist}
41b21e
License:          EPL
41b21e
URL:              http://pydev.org
41b21e
dc00b4
Source0:          https://github.com/fabioz/Pydev/archive/pydev_%{release_version}.tar.gz
41b21e
41b21e
# Remove windows specific code that manipulates the windows registry
41b21e
Patch0:           remove-winregistry.patch
41b21e
Patch1:           remove-iInfo-error.patch
41b21e
41b21e
# Allow system jython interpreter to be configured in preferences
41b21e
Patch2:           system-jython-interpreter.patch
41b21e
41b21e
# Fix native name
41b21e
Patch3:           native-name.patch
41b21e
41b21e
# Remove fund-raising dialog
41b21e
Patch4:           no-fund-raising-screen.patch
41b21e
41b21e
# Fix for failing to kill django processes
41b21e
Patch5:           fix-process-killing.patch
41b21e
dc00b4
# Fixes mysterious empty shell when checking editor prefs
dc00b4
Patch6:           remove-redundant-shell.patch
dc00b4
41b21e
Requires: %{?scl_prefix}eclipse-platform
41b21e
Requires: python
41b21e
Requires: %{?scl_prefix_java_common}apache-commons-logging
dc00b4
Requires: %{?scl_prefix_java_common}snakeyaml
41b21e
Requires: %{?scl_prefix_java_common}ws-commons-util
41b21e
Requires: %{?scl_prefix_java_common}xmlrpc-common
41b21e
Requires: %{?scl_prefix_java_common}xmlrpc-client
41b21e
Requires: %{?scl_prefix_java_common}xmlrpc-server
41b21e
Requires: %{?scl_prefix}jython >= 2.7
dc00b4
Requires: %{?scl_prefix}antlr32-java >= 3.2
dc00b4
41b21e
BuildRequires:    %{?scl_prefix}tycho >= 0.22.0-15
41b21e
BuildRequires:    %{?scl_prefix}tycho-extras
41b21e
BuildRequires:    %{?scl_prefix}eclipse-p2-discovery
41b21e
BuildRequires:    %{?scl_prefix}eclipse-mylyn-context-team >= 3.5.0
41b21e
BuildRequires:    %{?scl_prefix}eclipse-mylyn-ide >= 3.5.0
41b21e
BuildRequires:    %{?scl_prefix_java_common}apache-commons-logging
dc00b4
BuildRequires:    %{?scl_prefix_java_common}snakeyaml
41b21e
BuildRequires:    %{?scl_prefix_java_common}ws-commons-util
41b21e
BuildRequires:    %{?scl_prefix_java_common}xmlrpc-common
41b21e
BuildRequires:    %{?scl_prefix_java_common}xmlrpc-client
41b21e
BuildRequires:    %{?scl_prefix_java_common}xmlrpc-server
41b21e
BuildRequires:    %{?scl_prefix}jython >= 2.7
dc00b4
BuildRequires:    %{?scl_prefix_java_common}lucene5
dc00b4
BuildRequires:    %{?scl_prefix_java_common}lucene5-analysis
dc00b4
41b21e
41b21e
%description
41b21e
The eclipse-pydev package contains Eclipse plugins for
41b21e
Python development.
41b21e
41b21e
%package  mylyn
41b21e
Summary:  Pydev Mylyn Focused UI
41b21e
Requires: %{?scl_prefix}eclipse-mylyn-context-team >= 3.5.0
41b21e
Requires: %{?scl_prefix}eclipse-mylyn-ide >= 3.5.0
41b21e
Requires: %{name} = %{epoch}:%{version}-%{release}
41b21e
41b21e
%description mylyn
41b21e
Mylyn Task-Focused UI extensions for Pydev.
41b21e
41b21e
%prep
41b21e
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
dc00b4
%setup -q -n Pydev-pydev_%{release_version}
41b21e
%patch0
41b21e
%patch1 -p1
41b21e
%patch2 -p1
41b21e
%patch3
41b21e
%patch4
41b21e
%patch5 -p1
dc00b4
%patch6 -p1
41b21e
41b21e
%mvn_package "::pom:" __noinstall
41b21e
%mvn_package ":*.mylyn" mylyn
41b21e
%mvn_package ":*.mylyn.*" mylyn
41b21e
%mvn_package ":*" core
41b21e
41b21e
find -name 'Copy\ of\ opentype.gif' -exec rm -f '{}' \;
41b21e
41b21e
# remove bundled ctypes (used only under cygwin)
41b21e
rm -r plugins/org.python.pydev/pysrc/third_party/wrapped_for_pydev
41b21e
41b21e
# remove pre-built artifacts
41b21e
find -name '*.class' -delete
41b21e
find -name '*.jar' -delete
41b21e
find -name '*.dll' -delete
41b21e
find -name '*.dylib' -delete
41b21e
find -name '*.so' -delete
41b21e
rm -rf plugins/org.python.pydev.jython/Lib
41b21e
touch plugins/org.python.pydev.jython/Lib
41b21e
41b21e
# Link to system jython
41b21e
# we must include all of jython's runtime dependencies on the classpath
41b21e
pushd plugins/org.python.pydev.jython
41b21e
build-jar-repository -s -p . \
41b21e
  jython/jython guava jnr-constants jnr-ffi jnr-netdb jnr-posix jffi jline/jline jansi/jansi antlr32/antlr-runtime \
41b21e
  objectweb-asm5/asm-5 objectweb-asm5/asm-commons-5 objectweb-asm5/asm-util-5 commons-compress icu4j \
41b21e
  netty/netty-buffer netty/netty-codec netty/netty-common netty/netty-handler netty/netty-transport
41b21e
for j in $(ls *.jar) ; do
41b21e
  if [ -z "$js" ] ; then js="$j"; else js="${js},$j"; fi
41b21e
done
41b21e
sed -i -e 's/\r//' -e "s/^ jython\.jar/ $js/" META-INF/MANIFEST.MF
41b21e
sed -i -e "s/ jython\.jar/ $js/" build.properties
41b21e
popd
41b21e
41b21e
# links to other system jars
41b21e
ln -sf %{_javadir_java_common}/commons-logging.jar \
41b21e
       plugins/org.python.pydev.shared_interactive_console/commons-logging-1.1.1.jar
41b21e
41b21e
ln -sf %{_javadir_java_common}/ws-commons-util.jar \
41b21e
       plugins/org.python.pydev.shared_interactive_console/ws-commons-util-1.0.2.jar
41b21e
41b21e
ln -sf %{_javadir_java_common}/xmlrpc-client.jar \
41b21e
       plugins/org.python.pydev.shared_interactive_console/xmlrpc-client-3.1.3.jar
41b21e
41b21e
ln -sf %{_javadir_java_common}/xmlrpc-common.jar \
41b21e
       plugins/org.python.pydev.shared_interactive_console/xmlrpc-common-3.1.3.jar
41b21e
41b21e
ln -sf %{_javadir_java_common}/xmlrpc-server.jar \
41b21e
       plugins/org.python.pydev.shared_interactive_console/xmlrpc-server-3.1.3.jar
41b21e
dc00b4
ln -sf %{_javadir_java_common}/snakeyaml.jar \
41b21e
       plugins/org.python.pydev.shared_core/libs/snakeyaml-1.11.jar
41b21e
dc00b4
ln -sf %{_javadir_java_common}/lucene5/lucene-core-5.jar \
dc00b4
       plugins/org.python.pydev.shared_core/libs/lucene-core-5.2.1.jar
dc00b4
dc00b4
ln -sf %{_javadir_java_common}/lucene5/lucene-analyzers-common-5.jar \
dc00b4
       plugins/org.python.pydev.shared_core/libs/lucene-analyzers-common-5.2.1.jar
dc00b4
dc00b4
41b21e
# Fix encodings
41b21e
iconv -f CP1252 -t UTF-8 LICENSE.txt > LICENSE.txt.utf
41b21e
mv LICENSE.txt.utf LICENSE.txt
41b21e
%{?scl:EOF}
41b21e
41b21e
41b21e
%build
41b21e
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
41b21e
# build native part first
41b21e
pushd plugins/org.python.pydev/pysrc/pydevd_attach_to_process/linux &>/dev/null
41b21e
g++ %{optflags} -shared -o attach_linux.so -fPIC -nostartfiles attach_linux.c
41b21e
mv attach_linux.so ../attach_linux.so
41b21e
popd &>/dev/null
41b21e
41b21e
# build everything else
41b21e
%mvn_build -j -f -- -DforceContextQualifier=$(date +%Y%m%d%H00)
41b21e
%{?scl:EOF}
41b21e
41b21e
41b21e
%install
41b21e
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
41b21e
%mvn_install
41b21e
41b21e
# fix perms on native lib
41b21e
find ${RPM_BUILD_ROOT} -name attach_linux.so -exec chmod +x {} \;
41b21e
41b21e
# deal with linked deps
41b21e
installDir=${RPM_BUILD_ROOT}/%{_libdir}/eclipse/dropins/pydev-core
41b21e
pushd $installDir/eclipse/plugins
41b21e
41b21e
file=`find . -name commons-logging-1.1.1.jar`
41b21e
rm $file
41b21e
ln -sf %{_javadir_java_common}/commons-logging.jar $file
41b21e
41b21e
file=`find . -name ws-commons-util-1.0.2.jar`
41b21e
rm $file
41b21e
ln -sf %{_javadir_java_common}/ws-commons-util.jar $file
41b21e
41b21e
file=`find . -name xmlrpc-client-3.1.3.jar`
41b21e
rm $file
41b21e
ln -sf %{_javadir_java_common}/xmlrpc-client.jar $file
41b21e
41b21e
file=`find . -name xmlrpc-common-3.1.3.jar`
41b21e
rm $file
41b21e
ln -sf %{_javadir_java_common}/xmlrpc-common.jar $file
41b21e
41b21e
file=`find . -name xmlrpc-server-3.1.3.jar`
41b21e
rm $file
41b21e
ln -sf %{_javadir_java_common}/xmlrpc-server.jar $file
41b21e
41b21e
file=`find . -name snakeyaml-1.11.jar`
41b21e
rm $file
dc00b4
ln -sf %{_javadir_java_common}/snakeyaml.jar $file
41b21e
dc00b4
file=`find . -name lucene-core-5.2.1.jar`
dc00b4
rm $file
dc00b4
ln -sf %{_javadir_java_common}/lucene5/lucene-core-5.jar $file
dc00b4
dc00b4
file=`find . -name lucene-analyzers-common-5.2.1.jar`
dc00b4
rm $file
dc00b4
ln -sf %{_javadir_java_common}/lucene5/lucene-analyzers-common-5.jar $file
41b21e
popd
41b21e
41b21e
# Symlink system jython and libs
41b21e
pushd $installDir/eclipse/plugins/org.python.pydev.jython_*
41b21e
rm -rf Lib
41b21e
ln -sf %{_datadir}/jython/Lib
41b21e
build-jar-repository -s -p . \
41b21e
  jython/jython guava jnr-constants jnr-ffi jnr-netdb jnr-posix jffi jline/jline jansi/jansi antlr32/antlr-runtime \
41b21e
  objectweb-asm5/asm-5 objectweb-asm5/asm-commons-5 objectweb-asm5/asm-util-5 commons-compress icu4j \
41b21e
  netty/netty-buffer netty/netty-codec netty/netty-common netty/netty-handler netty/netty-transport
41b21e
popd
41b21e
41b21e
# convert .py$ files from mode 0644 to mode 0755
41b21e
sixFourFourfiles=$(find ${RPM_BUILD_ROOT} -name '*\.py' -perm 0644 | xargs)
41b21e
if [ ${sixFourFourfiles:-0} -ne 0 ]; then
41b21e
  chmod 0755 ${sixFourFourfiles}
41b21e
fi
41b21e
%{?scl:EOF}
41b21e
41b21e
41b21e
%files -f .mfiles-core
41b21e
%doc LICENSE.txt README.txt
41b21e
41b21e
%files mylyn -f .mfiles-mylyn
41b21e
%doc LICENSE.txt
41b21e
41b21e
%changelog
dc00b4
* Mon Apr 04 2016 Mat Booth <mat.booth@redhat.com> - 1:4.5.5-1.1
dc00b4
- Fix redundant empty shell when checking editor prefs, rhbz#1311099
dc00b4
dc00b4
* Tue Mar 29 2016 Sopot Cela <scela@redhat.com> - 1:4.5.5-1
dc00b4
- Update to upstream 4.5.5
dc00b4
dc00b4
* Mon Feb 29 2016 Mat Booth <mat.booth@redhat.com> - 1:4.5.4-0.2.git3694021.3
dc00b4
- Rebuild 2016-02-29
dc00b4
dc00b4
* Wed Feb 17 2016 Sopot Cela <scela@redhat.com> - 1:4.5.4-0.2.git3694021.2
dc00b4
- Fix antlr dependency 
dc00b4
dc00b4
* Wed Feb 17 2016 Sopot Cela <scela@redhat.com> - 1:4.5.4-0.2.git3694021.1
dc00b4
- Fix snakeyaml, dependency issues and update fedora-compliant version
dc00b4
dc00b4
* Wed Feb 17 2016 Sopot Cela <scela@redhat.com> - 1:4.5.4-0.1.git3694021
dc00b4
- Upgrade to pre 4.5.4 release
dc00b4
41b21e
* Wed Oct 21 2015 Mat Booth <mat.booth@redhat.com> - 1:4.1.0-2.5
41b21e
- Fix for failing to kill django processes
41b21e
- rhbz#1264446
41b21e
41b21e
* Wed Aug 12 2015 Mat Booth <mat.booth@redhat.com> - 1:4.1.0-2.4
41b21e
- Add all necessary symlinks for jython
41b21e
- Don't bother users with upstream project fund-raising screen
41b21e
- rhbz#1251408
41b21e
41b21e
* Fri Jul 17 2015 Mat Booth <mat.booth@redhat.com> - 1:4.1.0-2.3
41b21e
- Fix perms on native lib to fix binary stripping
41b21e
- Generate debuginfo
41b21e
41b21e
* Thu Jul 09 2015 Mat Booth <mat.booth@redhat.com> - 1:4.1.0-2.2
41b21e
- Avoid dependencies on packages from maven30 collection
41b21e
41b21e
* Wed Jul 08 2015 Mat Booth <mat.booth@redhat.com> - 1:4.1.0-2.1
41b21e
- Import latest from Fedora
41b21e
41b21e
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.1.0-2
41b21e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
41b21e
41b21e
* Wed May 27 2015 Alexander Kurtakov <akurtako@redhat.com> 1:4.1.0-1
41b21e
- Update to upstream 4.1.0 release.
41b21e
41b21e
* Wed May 13 2015 Alexander Kurtakov <akurtako@redhat.com> 1:4.0.0-2
41b21e
- Make mylyn subpackage archful as timestamps make diff and fail builds.
41b21e
41b21e
* Wed Apr 15 2015 Mat Booth <mat.booth@redhat.com> - 1:4.0.0-1
41b21e
- Update to latest upstream release
41b21e
- No longer necessary to symlink optparse
41b21e
- Now archful package due to having a native component
41b21e
41b21e
* Mon Dec 8 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.7.1-2
41b21e
- Build with xmvn.
41b21e
41b21e
* Thu Sep 18 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.7.1-1
41b21e
- Update to upstream 3.7.1.
41b21e
41b21e
* Thu Jul 31 2014 Mat Booth <mat.booth@redhat.com> - 1:3.6.0-1
41b21e
- Update to latest upstream release
41b21e
- Require jython 2.7
41b21e
- Remove no longer needed patches
41b21e
41b21e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.5.0-4
41b21e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
41b21e
41b21e
* Wed Jun 04 2014 Mat Booth <mat.booth@redhat.com> - 1:3.5.0-3
41b21e
- Patch to allow system jython interpreter to be configured in preferences
41b21e
41b21e
* Mon Jun 02 2014 Mat Booth <mat.booth@redhat.com> - 1:3.5.0-2
41b21e
- Patch to build with latest version of jython
41b21e
- Install license files
41b21e
- No longer need to package a portion of jython's lib dir
41b21e
41b21e
* Thu May 29 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.5.0-1
41b21e
- Update to 3.5.0.
41b21e
41b21e
* Thu Mar 20 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.4.1-1
41b21e
- Update to 3.4.1.
41b21e
41b21e
* Wed Feb 12 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.3.3-1
41b21e
- Update to 3.3.3.
41b21e
41b21e
* Mon Dec 30 2013 Alexander Kurtakov <akurtako@redhat.com> 1:3.2.0-1
41b21e
- Update to 3.2.0.
41b21e
41b21e
* Fri Dec 13 2013 Alexander Kurtakov <akurtako@redhat.com> 1:3.1.0-1
41b21e
- Update to 3.1.0.
41b21e
41b21e
* Mon Nov 11 2013 Alexander Kurtakov <akurtako@redhat.com> 1:3.0-1
41b21e
- Update to 3.0.
41b21e
- Drop old changelog now that we move to tycho builds.