qscintilla-vl.spec 5.4 KB

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