3 # - fix building with qscintilla2(-devel) installed, remove BC
4 # - how to successfully prepend -I../Qt4Qt5 before system qt include in qmake?
5 # - QScintilla2 for Qt3 (does it make any sense nowadays?)
6 # - QScintilla2 for Qt5
9 %bcond_without python2 # CPython 2.x module
10 %bcond_without python3 # CPython 3.x module
11 %bcond_without qt4 # Qt4 library and modules
12 %bcond_without qt5 # Qt5 library and modules
14 %define scintilla_ver 3.3.6
16 Summary: QScintilla2 - a port to Qt of the Scintilla editing component
17 Summary(pl.UTF-8): QScintilla2 - port komponentu edytora Scintilla dla biblioteki Qt
21 License: GPL v2 or GPL v3 with Riverbank GPL Exception v1.1
23 Source0: http://downloads.sourceforge.net/pyqt/QScintilla-gpl-%{version}.tar.gz
24 # Source0-md5: 28aec903ff48ae541295a4fb9c96f8ea
25 Patch0: %{name}-internal_build.patch
26 Patch1: %{name}-multiqt.patch
27 Patch2: %{name}-make.patch
28 Patch3: %{name}-outoftree.patch
29 URL: http://www.riverbankcomputing.co.uk/software/qscintilla/
31 BuildRequires: python-PyQt4-devel >= 4.8.2
32 BuildRequires: python-sip-devel >= 2:%{sip_ver}
35 BuildRequires: python3-PyQt4-devel >= 4.8.2
36 BuildRequires: python3-sip-devel >= 2:%{sip_ver}
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.558
41 BuildRequires: QtDesigner-devel >= 4.8
42 BuildRequires: QtGui-devel >= 4.8
43 BuildRequires: qt4-build >= 4.8
44 BuildRequires: qt4-qmake >= 4.8
47 BuildRequires: Qt5Designer-devel >= 5
48 BuildRequires: Qt5Gui-devel >= 5
49 BuildRequires: qt5-build >= 5
50 BuildRequires: qt5-qmake >= 5
52 BuildConflicts: qscintilla2-devel
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define _sipfilesdir %{_datadir}/sip
58 QScintilla2 is a port to Qt of the Scintilla editing component.
59 This version of QScintilla is based on Scintilla v%{scintilla_ver}.
61 %description -l pl.UTF-8
62 QScintilla2 to port komponentu edytora Scintilla dla biblioteki Qt.
63 Ta wersja QScintilli jest oparta na Scintilli %{scintilla_ver}.
66 Summary: Development files for the QScintilla2
67 Summary(pl.UTF-8): Pliki nagłówkowe dla komponentu QScintilla2
68 Group: X11/Development/Libraries
69 Requires: %{name} = %{version}-%{release}
73 This package contains the header files necessary to develop
74 applications using QScintilla2.
76 %description devel -l pl.UTF-8
77 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
78 użyciem komponentu QScintilla2.
80 %package -n QtDesigner-plugin-%{name}
81 Summary: QScintilla2 plugin for Qt Designer
82 Summary(pl.UTF-8): Wtyczka QScintilla2 dla Qt Designera
83 Group: X11/Development/Libraries
84 Requires: %{name} = %{version}-%{release}
87 %description -n QtDesigner-plugin-%{name}
88 QScintilla2 plugin for Qt Designer that allows QScintilla instances
89 to be included in GUI designs just like any other Qt widget.
91 %description -n QtDesigner-plugin-%{name} -l pl.UTF-8
92 Wtyczka WScintilla2 dla Qt Designera pozwalająca na włączanie
93 instancji QScintilli w projekty GUI w ten sam sposób, co inne widgety
96 %package -n python-%{name}
97 Summary: Python bindings for the QScintilla2
98 Summary(pl.UTF-8): Wiązania Pythona dla komponentu QScintilla2
99 Group: Libraries/Python
100 Requires: %{name} = %{version}-%{release}
101 %requires_ge python-PyQt4
103 %description -n python-%{name}
104 Python bindings for the QScintilla2.
106 %description -n python-%{name} -l pl.UTF-8
107 Wiązania Pythona dla komponentu QScintilla2.
109 %package -n python-%{name}-devel
110 Summary: Python bindings for the QScintilla2 - development files
111 Summary(pl.UTF-8): Wiązania Pythona dla komponentu QScintilla2 - pliki programistyczne
112 Group: Development/Languages/Python
113 Requires: python-%{name} = %{version}-%{release}
114 Requires: python-PyQt4-devel >= 4.8.2
116 %description -n python-%{name}-devel
117 Python bindings for the QScintilla2 - development files.
119 %description -n python-%{name}-devel -l pl.UTF-8
120 Wiązania Pythona dla komponentu QScintilla2 - pliki programistyczne.
123 %setup -q -n QScintilla-gpl-%{version}
130 for qt in %{?with_qt4:qt4} %{?with_qt5:qt5} ; do
131 install -d build-${qt}/{Qt4Qt5,designer-Qt4Qt5,Python2,Python3}
132 cd build-${qt}/Qt4Qt5
133 qmake-${qt} ../../Qt4Qt5/qscintilla.pro
135 cd ../designer-Qt4Qt5
136 qmake-${qt} ../../designer-Qt4Qt5/designer.pro
142 # setup PATH to get proper qmake
143 # pass --apidir because configure.py default is inconsistent with sources (no /qsci subdir)
144 PATH=%{_libdir}/${qt}/bin:$PATH \
145 %{__python} ../../Python/configure.py \
150 --apidir=%{_datadir}/${qt}/qsci
156 PATH=%{_libdir}/${qt}/bin:$PATH \
157 %{__python3} ../../Python/configure.py \
162 --apidir=%{_datadir}/${qt}/qsci
170 rm -rf $RPM_BUILD_ROOT
171 #install -d $RPM_BUILD_ROOT%{_datadir}/qt5/qsci/api
173 for qt in %{?with_qt4:qt4} %{?with_qt5:qt5} ; do
174 %{__make} -C build-${qt}/Qt4Qt5 install \
175 INSTALL_ROOT=$RPM_BUILD_ROOT
176 %{__make} -C build-${qt}/designer-Qt4Qt5 install \
177 INSTALL_ROOT=$RPM_BUILD_ROOT
179 %{__make} -C build-${qt}/Python3 install \
180 INSTALL_ROOT=$RPM_BUILD_ROOT
183 %{__make} -C build-${qt}/Python2 install \
184 INSTALL_ROOT=$RPM_BUILD_ROOT
188 for file in $RPM_BUILD_ROOT%{_datadir}/locale/*.qm
190 lang=`echo $file | sed -r 's:.*/[a-zA-Z]*_(.*).qm:\1:'`
191 [ "$lang" == "pt_br" ] && lang=pt_BR
192 install -d $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES
193 mv -f $file $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/qscintilla2.qm
196 # unnecessary symlink
197 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libqscintilla2.so.11.3
200 rm -rf $RPM_BUILD_ROOT
202 %post -p /sbin/ldconfig
203 %postun -p /sbin/ldconfig
206 %defattr(644,root,root,755)
207 %doc GPL_EXCEPTION.TXT NEWS OPENSOURCE-NOTICE.TXT README
208 %attr(755,root,root) %{_libdir}/libqscintilla2.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/libqscintilla2.so.11
210 %lang(cs) %{_datadir}/locale/cs/LC_MESSAGES/qscintilla2.qm
211 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/qscintilla2.qm
212 %lang(es) %{_datadir}/locale/es/LC_MESSAGES/qscintilla2.qm
213 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/qscintilla2.qm
214 %lang(pt_BR) %{_datadir}/locale/pt_BR/LC_MESSAGES/qscintilla2.qm
215 %dir %{_datadir}/qt4/qsci
216 %dir %{_datadir}/qt4/qsci/api
217 %dir %{_datadir}/qt5/qsci
218 %dir %{_datadir}/qt5/qsci/api
221 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_libdir}/libqscintilla2.so
224 %{_includedir}/qt4/Qsci
225 %{_datadir}/qt4/mkspecs/features/qscintilla2.prf
227 %files -n QtDesigner-plugin-%{name}
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/qt4/plugins/designer/libqscintillaplugin.so
231 %files -n python-%{name}
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{py_sitedir}/PyQt4/Qsci.so
234 %dir %{_datadir}/qt4/qsci/api/python
235 %{_datadir}/qt4/qsci/api/python/Python-*.api
236 %{_datadir}/qt4/qsci/api/python/QScintilla2.api
238 %files -n python-%{name}-devel
239 %defattr(644,root,root,755)
240 %{_sipfilesdir}/PyQt4/Qsci