qscintilla-vl.spec 5.5 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.8
  3. %define ver 1.78
  4. %define _qt4_version 4.7.2
  5. %define _qt4_prefix %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{_qt4_version})
  6. %define _qt4_libdir %(pkg-config --variable libdir --silence-errors Qt 2>/dev/null || echo %{_qt4_prefix}/lib)
  7. %define _qt4_includedir %(pkg-config --variable headerdir --silence-errors Qt 2>/dev/null || echo %{_qt4_prefix}/include)
  8. %define _qt4_translationdir %(pkg-config --variable translationdir --silence-errors Qt 2>/dev/null || echo %{_datadir}/qt4/translations)
  9. %global qtdir %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{qt4_version})
  10. %global qtinc %{qtdir}/include
  11. %global qtlib %{qtdir}/lib
  12. Summary: A Scintilla port to Qt
  13. Name: qscintilla
  14. Version: 2.4.6
  15. Release: 2%{?_dist_release}
  16. # matches up (pretty much) with qt4
  17. License: GPLv3 or GPLv2 with exceptions
  18. Group: Development/Tools
  19. URL: http://www.riverbankcomputing.co.uk/qscintilla
  20. Source: QScintilla-gpl-%{version}.tar.gz
  21. # TODO: upstream this
  22. Patch1: QScintilla-2-gpl-Qt4-incpath.patch
  23. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  24. BuildRequires: qt4-devel
  25. BuildRequires: PyQt4-devel >= %{pyqt4_version}
  26. Requires: qt4 = %{_qt4_version}
  27. %description
  28. QScintilla is a port of Scintilla to the Qt GUI toolkit.
  29. This version of QScintilla is based on Scintilla v%{ver}.
  30. %package designer
  31. Summary: QScintilla designer plugin
  32. Group: Development/Tools
  33. Requires: %{name} = %{version}-%{release}
  34. Requires: qt4-designer
  35. %description designer
  36. %{summary}.
  37. %package devel
  38. Summary: QScintilla Development Files
  39. Group: Development/Libraries
  40. Requires: %{name} = %{version}
  41. Requires: qt4-devel = %{_qt4_version}
  42. %description devel
  43. This packages contains the libraries, include and other files
  44. you can use to develop applications with QScintilla.
  45. %package python
  46. Summary: QScintilla PyQt4 bindings
  47. Group: Development/Libraries
  48. Requires: %{name} = %{version}-%{release}
  49. Requires: PyQt4 >= %{pyqt4_version}
  50. %description python
  51. %{summary}.
  52. %package python-devel
  53. Summary: Development files for QScintilla PyQt4 bindings
  54. Group: Development/Libraries
  55. Requires: %{name}-python = %{version}-%{release}
  56. Requires: PyQt4-devel
  57. %description python-devel
  58. %{summary}.
  59. %prep
  60. %setup -q -n QScintilla-gpl-%{version}
  61. %patch1 -p1 -b .designer-incpath-qt4
  62. # fix permissions on doc files
  63. find doc example-Qt4 -type f -exec chmod 0644 {} ';'
  64. find src include -type f -exec chmod 0644 {} ';'
  65. # fix line endings in license file(s)
  66. sed -i 's/\r//' LICENSE.GPL2 GPL_EXCEPTION_ADDENDUM.TXT
  67. %build
  68. export QTDIR=%{_qt4_prefix}
  69. %ifarch x86_64
  70. export QMAKESPEC=$QTDIR/mkspecs/linux-g++-64/
  71. %else
  72. export QMAKESPEC=$QTDIR/mkspecs/linux-g++/
  73. %endif
  74. pushd Qt4
  75. $QTDIR/bin/qmake -o Makefile qscintilla.pro
  76. make %{?_smp_mflags}
  77. popd
  78. pushd designer-Qt4
  79. $QTDIR/bin/qmake -o Makefile designer.pro
  80. make %{?_smp_mflags}
  81. popd
  82. pushd Python
  83. %{__python} configure.py \
  84. -c -j 3 \
  85. -n ../Qt4 \
  86. -o ../Qt4
  87. make %{?_smp_mflags}
  88. popd
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. make install INSTALL_ROOT=$RPM_BUILD_ROOT -C Qt4
  92. make install INSTALL_ROOT=$RPM_BUILD_ROOT -C designer-Qt4
  93. make install DESTDIR=$RPM_BUILD_ROOT -C Python
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT
  96. %post -p /sbin/ldconfig
  97. %postun -p /sbin/ldconfig
  98. %files
  99. %defattr(-, root, root, 755)
  100. %doc NEWS README
  101. %doc LICENSE.GPL3 LICENSE.GPL2 GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT
  102. %{_qt4_libdir}/libqscintilla2.so.*
  103. %{_qt4_prefix}/qsci/*
  104. %{_qt4_translationdir}/*
  105. %files designer
  106. %defattr(-,root,root,-)
  107. %{_qt4_prefix}/plugins/designer/libqscintillaplugin.so
  108. %files devel
  109. %defattr(-, root, root, -)
  110. %{_qt4_includedir}/*
  111. %{_qt4_libdir}/libqscintilla2.so
  112. %files python
  113. %defattr(-,root,root,-)
  114. %{python_sitearch}/PyQt4/Qsci.so
  115. %files python-devel
  116. %defattr(-,root,root,-)
  117. %{_datadir}/sip/PyQt4/Qsci
  118. %changelog
  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