qscintilla-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  2. %global pyqt4_version 4.11.2
  3. %define ver 3.3.6
  4. %define _qt4_version 4.8.6
  5. %define _qt4_prefix %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt4)
  6. %define _qt4_libdir %(pkg-config --variable libdir --silence-errors Qt 2>/dev/null || echo %{_libdir})
  7. %define _qt4_headerdir %(pkg-config --variable headerdir --silence-errors Qt 2>/dev/null || echo %{_includedir})
  8. %define _qt4_translationdir %(pkg-config --variable translationdir --silence-errors Qt 2>/dev/null || echo %{_datadir}/qt4/translations)
  9. Summary: A Scintilla port to Qt
  10. Summary(ja): Scintilla の Qt への移植版
  11. Name: qscintilla
  12. Version: 2.8.4
  13. Release: 1%{?_dist_release}
  14. # matches up (pretty much) with qt4
  15. License: GPLv3 or GPLv2 with exceptions
  16. Group: System Environment/Libraries
  17. URL: http://www.riverbankcomputing.co.uk/qscintilla
  18. Source: QScintilla-gpl-%{version}.tar.gz
  19. # TODO: upstream this
  20. Patch1: QScintilla-2-gpl-Qt4-incpath.patch
  21. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  22. BuildRequires: qt4-devel
  23. BuildRequires: PyQt4-devel >= %{pyqt4_version}
  24. BuildRequires: sip-devel
  25. Requires: qt4 >= %{_qt4_version}
  26. %description
  27. QScintilla is a port of Scintilla to the Qt GUI toolkit.
  28. This version of QScintilla is based on Scintilla v%{ver}.
  29. %package designer
  30. Summary: QScintilla designer plugin
  31. Summary(ja): QScintilla デザイナプラグイン
  32. Group: System Environment/Libraries
  33. Requires: %{name} = %{version}-%{release}
  34. Requires: qt4-designer
  35. %description designer
  36. %{summary}.
  37. %package devel
  38. Summary: QScintilla Development Files
  39. Summary(ja): QScintilla 開発用ファイル
  40. Group: Development/Libraries
  41. Requires: %{name} = %{version}-%{release}
  42. Requires: qt4-devel >= %{_qt4_version}
  43. %description devel
  44. This packages contains the libraries, include and other files
  45. you can use to develop applications with QScintilla.
  46. %package python
  47. Summary: QScintilla python bindings
  48. Summary(ja): QScintilla の Python バインディング
  49. Group: System Environment/Libraries
  50. Requires: %{name} = %{version}-%{release}
  51. Requires: PyQt4 >= %{pyqt4_version}
  52. Provides: python-qscintilla = %{version}-%{release}
  53. %description python
  54. %{summary}.
  55. %package python-devel
  56. Summary: Development files for QScintilla python bindings
  57. Summary(ja): QScintilla の Python バインディングの開発用ファイル
  58. Group: Development/Libraries
  59. Requires: %{name}-python = %{version}-%{release}
  60. Requires: PyQt4-devel >= %{pyqt4_version}
  61. %description python-devel
  62. %{summary}.
  63. %prep
  64. %setup -q -n QScintilla-gpl-%{version}
  65. # fix permissions on doc files
  66. find doc example-Qt4Qt5 -type f -exec chmod 0644 {} ';'
  67. find src include -type f -exec chmod 0644 {} ';'
  68. # fix line endings in license file(s)
  69. sed -i 's/\r//' LICENSE.GPL2 GPL_EXCEPTION_ADDENDUM.TXT
  70. %build
  71. export QTDIR=%{_qt4_prefix}
  72. %ifarch x86_64
  73. export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64/
  74. %else
  75. export QMAKESPEC=$QTDIR/mkspecs/linux-g++/
  76. %endif
  77. cd Qt4Qt5
  78. $QTDIR/bin/qmake -o Makefile qscintilla.pro
  79. make %{?_smp_mflags}
  80. cd ..
  81. cd designer-Qt4Qt5
  82. QMAKEFEATURES=../Qt4Qt5/features \
  83. $QTDIR/bin/qmake -o Makefile designer.pro INCLUDEPATH+=../Qt4Qt5 LIBS+=-L../Qt4Qt5
  84. make %{?_smp_mflags}
  85. cd ..
  86. cd Python
  87. %{__python} configure.py \
  88. --no-timestamp \
  89. --qsci-incdir=../Qt4Qt5 \
  90. --qsci-libdir=../Qt4Qt5
  91. make %{?_smp_mflags}
  92. cd ..
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. make install INSTALL_ROOT=$RPM_BUILD_ROOT -C Qt4Qt5
  96. make install INSTALL_ROOT=$RPM_BUILD_ROOT -C designer-Qt4Qt5
  97. make install INSTALL_ROOT=$RPM_BUILD_ROOT DESTDIR=$RPM_BUILD_ROOT -C Python
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT
  100. %post -p /sbin/ldconfig
  101. %postun -p /sbin/ldconfig
  102. %files
  103. %defattr(-, root, root, 755)
  104. %doc NEWS README
  105. %doc LICENSE.GPL3 LICENSE.GPL2 GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT
  106. %{_qt4_libdir}/libqscintilla2.so.*
  107. %{_qt4_prefix}/qsci/*
  108. %{_qt4_translationdir}/*
  109. %files designer
  110. %defattr(-,root,root,-)
  111. %{_qt4_prefix}/plugins/designer/libqscintillaplugin.so
  112. %files devel
  113. %defattr(-, root, root, -)
  114. %{_qt4_headerdir}/*
  115. %{_qt4_libdir}/libqscintilla2.so
  116. %{_qt4_prefix}/mkspecs/features/qscintilla2.prf
  117. %files python
  118. %defattr(-,root,root,-)
  119. %{python_sitearch}/PyQt4/Qsci.so
  120. %files python-devel
  121. %defattr(-,root,root,-)
  122. %{_datadir}/sip/PyQt4/Qsci
  123. %changelog
  124. * Sat Nov 8 2014 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.2-1
  125. - new upstream release
  126. - built with qt-4.8.6, PyQt4-4.11.2
  127. * Sat Jan 7 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6-1
  128. - new upstream release
  129. - built with qt-4.8.0, PyQt4-4.9
  130. * Sun Mar 13 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.6-2
  131. - rebuilt with qt-4.7.2
  132. * Sun Feb 20 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.6-1
  133. - new upstream release
  134. - fix qt4_ver from 4.6.3 to 4.7.1
  135. * Wed Aug 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.4-2
  136. - rebuild with qt4-4.6.3
  137. - fix qt4_ver from 4.6.1 to 4.6.3
  138. - fix BuildRequires: qt4-devel = %{qt4_ver} (add version)
  139. * Sun Jul 25 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1
  140. - new upstream release
  141. - updated qt4 macros
  142. * Sat Feb 06 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.2-1
  143. - new upstream release
  144. * Fri Feb 05 2010 Shu KONNO <owa@bg.wakwak.com> 2.4-3
  145. - rebuilt with qt4-4.6.1, python-2.6
  146. - installed translation to %%{_datadir}/qt4/translations now
  147. * Thu Oct 22 2009 Shu KONNO <owa@bg.wakwak.com> 2.4-2
  148. - updated macro pyqt4_version to 4.6
  149. - fixed changelog year below (2008 -> 2009)
  150. * Sat Aug 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4-1
  151. - new upstream release
  152. - added designer, python and python-devel sub-packages
  153. * Sun Aug 17 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.7.1-1
  154. - appiled new versioning policy
  155. * Fri Nov 30 2007 Shu KONNO <owa@bg.wakwak.com> 1.7.1-0vl2
  156. - updated macro QMAKESPEC to linux-g++-64 (if x86_64)
  157. * Thu Sep 13 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.7.1-0vl1
  158. - new upstream release (1.71)
  159. * Sun Jun 4 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6-0vl1
  160. - new upstream release (1.65)
  161. - changed Group to System Environment/Libraries
  162. * Sat Jan 15 2005 Satoshi MACHINO <machino@vinelinux.org> 1.4-0vl1
  163. - initial built for VineLinux