Advertisement
Guest User

Untitled

a guest
Jul 16th, 2015
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.90 KB | None | 0 0
  1. # Turn off the brp-python-bytecompile script
  2. %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
  3.  
  4. # Suppress empty debuginfo
  5. %global debug_package %{nil}
  6.  
  7. %global release_version 4_2_0
  8.  
  9. Epoch: 1
  10. Summary: Eclipse Python development plug-in
  11. Name: eclipse-pydev
  12. Version: 4.2.0
  13. Release: 1%{?dist}
  14. License: EPL
  15. URL: http://pydev.org
  16.  
  17. Source0: https://github.com/fabioz/Pydev/archive/pydev_%{release_version}.tar.gz
  18.  
  19. # Remove windows specific code that manipulates the windows registry
  20. Patch0: remove-winregistry.patch
  21. Patch1: remove-iInfo-error.patch
  22.  
  23. # Allow system jython interpreter to be configured in preferences
  24. Patch2: system-jython-interpreter.patch
  25.  
  26. # Fix native name
  27. Patch3: native-name.patch
  28.  
  29. Requires: eclipse-platform
  30. Requires: python
  31. Requires: apache-commons-logging
  32. Requires: snakeyaml
  33. Requires: ws-commons-util
  34. Requires: xmlrpc-common
  35. Requires: xmlrpc-client
  36. Requires: xmlrpc-server
  37. Requires: jython >= 2.7
  38. Requires: pylint
  39. Requires: python-django
  40. Requires: python-ipython-console
  41. BuildRequires: tycho >= 0.22.0-15
  42. BuildRequires: tycho-extras
  43. BuildRequires: eclipse-p2-discovery
  44. BuildRequires: eclipse-mylyn-context-team >= 3.5.0
  45. BuildRequires: eclipse-mylyn-ide >= 3.5.0
  46. BuildRequires: apache-commons-logging
  47. BuildRequires: snakeyaml
  48. BuildRequires: ws-commons-util
  49. BuildRequires: xmlrpc-common
  50. BuildRequires: xmlrpc-client
  51. BuildRequires: xmlrpc-server
  52. BuildRequires: jython >= 2.7
  53. BuildRequires: lucene-core
  54. BuildRequires: lucene-analysis
  55.  
  56. %description
  57. The eclipse-pydev package contains Eclipse plugins for
  58. Python development.
  59.  
  60. %package mylyn
  61. Summary: Pydev Mylyn Focused UI
  62. Requires: eclipse-mylyn-context-team >= 3.5.0
  63. Requires: eclipse-mylyn-ide >= 3.5.0
  64. Requires: %{name} = %{epoch}:%{version}-%{release}
  65.  
  66. %description mylyn
  67. Mylyn Task-Focused UI extensions for Pydev.
  68.  
  69. %prep
  70. %setup -q -n Pydev-pydev_%{release_version}
  71. %patch0
  72. %patch1 -p1
  73. %patch2 -p1
  74. %patch3
  75.  
  76. %mvn_package "::pom:" __noinstall
  77. %mvn_package ":*.mylyn" mylyn
  78. %mvn_package ":*.mylyn.*" mylyn
  79. %mvn_package ":*" core
  80.  
  81. find -name 'Copy\ of\ opentype.gif' -exec rm -f '{}' \;
  82.  
  83. # remove bundled ctypes (used only under cygwin)
  84. rm -r plugins/org.python.pydev/pysrc/third_party/wrapped_for_pydev
  85.  
  86. # remove pre-built artifacts
  87. find -name '*.class' -delete
  88. find -name '*.jar' -delete
  89. find -name '*.dll' -delete
  90. find -name '*.dylib' -delete
  91. find -name '*.so' -delete
  92. rm -rf plugins/org.python.pydev.jython/Lib
  93.  
  94. # link to system jars
  95. ln -sf %{_javadir}/jython/jython.jar \
  96. plugins/org.python.pydev.jython/jython.jar
  97.  
  98. ln -sf %{_datadir}/jython/Lib \
  99. plugins/org.python.pydev.jython/Lib
  100.  
  101. ln -sf %{_javadir}/commons-logging.jar \
  102. plugins/org.python.pydev.shared_interactive_console/commons-logging-1.1.1.jar
  103.  
  104. ln -sf %{_javadir}/ws-commons-util.jar \
  105. plugins/org.python.pydev.shared_interactive_console/ws-commons-util-1.0.2.jar
  106.  
  107. ln -sf %{_javadir}/xmlrpc-client.jar \
  108. plugins/org.python.pydev.shared_interactive_console/xmlrpc-client-3.1.3.jar
  109.  
  110. ln -sf %{_javadir}/xmlrpc-common.jar \
  111. plugins/org.python.pydev.shared_interactive_console/xmlrpc-common-3.1.3.jar
  112.  
  113. ln -sf %{_javadir}/xmlrpc-server.jar \
  114. plugins/org.python.pydev.shared_interactive_console/xmlrpc-server-3.1.3.jar
  115.  
  116. ln -sf %{_javadir}/snakeyaml.jar \
  117. plugins/org.python.pydev.shared_core/libs/snakeyaml-1.11.jar
  118.  
  119. ln -sf %{_javadir}/lucene/lucene-core.jar \
  120. plugins/org.python.pydev.shared_core/libs/lucene-core-5.1.0.jar
  121.  
  122. ln -sf %{_javadir}/lucene/lucene-analyzers-common.jar \
  123. plugins/org.python.pydev.shared_core/libs/lucene-analyzers-common-5.1.0.jar
  124.  
  125. # Fix encodings
  126. iconv -f CP1252 -t UTF-8 LICENSE.txt > LICENSE.txt.utf
  127. mv LICENSE.txt.utf LICENSE.txt
  128.  
  129. %build
  130. # build native part first
  131. pushd plugins/org.python.pydev/pysrc/pydevd_attach_to_process/linux &>/dev/null
  132. g++ %{optflags} -shared -o attach_linux.so -fPIC -nostartfiles attach_linux.c
  133. mv attach_linux.so ../attach_linux.so
  134. popd &>/dev/null
  135.  
  136. # build everything else
  137. %mvn_build -j -f -- -DforceContextQualifier=$(date +%Y%m%d%H00)
  138.  
  139. %install
  140. %mvn_install
  141.  
  142. # deal with linked deps
  143. installDir=${RPM_BUILD_ROOT}/%{_libdir}/eclipse/dropins/pydev-core
  144. pushd $installDir/eclipse/plugins
  145.  
  146. file=`find . -name commons-logging-1.1.1.jar`
  147. rm $file
  148. ln -sf %{_javadir}/commons-logging.jar $file
  149.  
  150. file=`find . -name ws-commons-util-1.0.2.jar`
  151. rm $file
  152. ln -sf %{_javadir}/ws-commons-util.jar $file
  153.  
  154. file=`find . -name xmlrpc-client-3.1.3.jar`
  155. rm $file
  156. ln -sf %{_javadir}/xmlrpc-client.jar $file
  157.  
  158. file=`find . -name xmlrpc-common-3.1.3.jar`
  159. rm $file
  160. ln -sf %{_javadir}/xmlrpc-common.jar $file
  161.  
  162. file=`find . -name xmlrpc-server-3.1.3.jar`
  163. rm $file
  164. ln -sf %{_javadir}/xmlrpc-server.jar $file
  165.  
  166. file=`find . -name snakeyaml-1.11.jar`
  167. rm $file
  168. ln -sf %{_javadir}/snakeyaml.jar $file
  169.  
  170. file=`find . -name lucene-core.jar`
  171. rm $file
  172. ln -sf %{_javadir}/lucene/lucene-core.jar $file
  173.  
  174. file=`find . -name lucene-analyzers-common.jar`
  175. rm $file
  176. ln -sf %{_javadir}/lucene/lucene-analyzers-common.jar $file
  177.  
  178. # Symlink system jython and libs
  179. rm -rf org.python.pydev.jython_*/Lib
  180. ln -sf %{_datadir}/jython/Lib \
  181. org.python.pydev.jython_*
  182. rm -rf org.python.pydev.jython_*/jython.jar
  183. ln -sf %{_javadir}/jython/jython.jar \
  184. org.python.pydev.jython_*
  185. popd
  186.  
  187. # convert .py$ files from mode 0644 to mode 0755
  188. sixFourFourfiles=$(find ${RPM_BUILD_ROOT} -name '*\.py' -perm 0644 | xargs)
  189. if [ ${sixFourFourfiles:-0} -ne 0 ]; then
  190. chmod 0755 ${sixFourFourfiles}
  191. fi
  192.  
  193. %files -f .mfiles-core
  194. %doc LICENSE.txt README.txt
  195.  
  196. %files mylyn -f .mfiles-mylyn
  197. %doc LICENSE.txt
  198.  
  199. %changelog
  200. * Thu Jul 16 2015 Sopot Cela <scela@redhat.com> - 1:4.2.0-1
  201. - Update to 4.2.0 release
  202.  
  203. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.1.0-2
  204. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  205.  
  206. * Wed May 27 2015 Alexander Kurtakov <akurtako@redhat.com> 1:4.1.0-1
  207. - Update to upstream 4.1.0 release.
  208.  
  209. * Wed May 13 2015 Alexander Kurtakov <akurtako@redhat.com> 1:4.0.0-2
  210. - Make mylyn subpackage archful as timestamps make diff and fail builds.
  211.  
  212. * Wed Apr 15 2015 Mat Booth <mat.booth@redhat.com> - 1:4.0.0-1
  213. - Update to latest upstream release
  214. - No longer necessary to symlink optparse
  215. - Now archful package due to having a native component
  216.  
  217. * Mon Dec 8 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.7.1-2
  218. - Build with xmvn.
  219.  
  220. * Thu Sep 18 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.7.1-1
  221. - Update to upstream 3.7.1.
  222.  
  223. * Thu Jul 31 2014 Mat Booth <mat.booth@redhat.com> - 1:3.6.0-1
  224. - Update to latest upstream release
  225. - Require jython 2.7
  226. - Remove no longer needed patches
  227.  
  228. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.5.0-4
  229. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  230.  
  231. * Wed Jun 04 2014 Mat Booth <mat.booth@redhat.com> - 1:3.5.0-3
  232. - Patch to allow system jython interpreter to be configured in preferences
  233.  
  234. * Mon Jun 02 2014 Mat Booth <mat.booth@redhat.com> - 1:3.5.0-2
  235. - Patch to build with latest version of jython
  236. - Install license files
  237. - No longer need to package a portion of jython's lib dir
  238.  
  239. * Thu May 29 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.5.0-1
  240. - Update to 3.5.0.
  241.  
  242. * Thu Mar 20 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.4.1-1
  243. - Update to 3.4.1.
  244.  
  245. * Wed Feb 12 2014 Alexander Kurtakov <akurtako@redhat.com> 1:3.3.3-1
  246. - Update to 3.3.3.
  247.  
  248. * Mon Dec 30 2013 Alexander Kurtakov <akurtako@redhat.com> 1:3.2.0-1
  249. - Update to 3.2.0.
  250.  
  251. * Fri Dec 13 2013 Alexander Kurtakov <akurtako@redhat.com> 1:3.1.0-1
  252. - Update to 3.1.0.
  253.  
  254. * Mon Nov 11 2013 Alexander Kurtakov <akurtako@redhat.com> 1:3.0-1
  255. - Update to 3.0.
  256. - Drop old changelog now that we move to tycho builds.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement