qscintilla-vl.spec 5.2 KB

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