qscintilla-vl.spec 4.4 KB

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