]>
Commit | Line | Data |
---|---|---|
9ee0f3af | 1 | # |
47f45644 | 2 | # TODO: |
a9a3cc91 | 3 | # - fix building with qscintilla2(-devel) installed, remove BC |
d86befc1 | 4 | # - how to successfully prepend -I../Qt4Qt5 before system qt include in qmake? |
47f45644 JB |
5 | # - QScintilla2 for Qt3 (does it make any sense nowadays?) |
6 | # - QScintilla2 for Qt5 | |
9ee0f3af | 7 | # |
d86befc1 JB |
8 | # Conditonal build: |
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 | |
13 | ||
14 | %define scintilla_ver 3.3.6 | |
15 | %define sip_ver 4.16 | |
9ee0f3af | 16 | Summary: QScintilla2 - a port to Qt of the Scintilla editing component |
0bd4b1b2 | 17 | Summary(pl.UTF-8): QScintilla2 - port komponentu edytora Scintilla dla biblioteki Qt |
9ee0f3af | 18 | Name: qscintilla2 |
d86befc1 JB |
19 | Version: 2.8.4 |
20 | Release: 1 | |
ece58d84 | 21 | License: GPL v2 or GPL v3 with Riverbank GPL Exception v1.1 |
9ee0f3af | 22 | Group: X11/Libraries |
69587943 | 23 | Source0: http://downloads.sourceforge.net/pyqt/QScintilla-gpl-%{version}.tar.gz |
d86befc1 | 24 | # Source0-md5: 28aec903ff48ae541295a4fb9c96f8ea |
9b858b8d | 25 | Patch0: %{name}-internal_build.patch |
d86befc1 JB |
26 | Patch1: %{name}-multiqt.patch |
27 | Patch2: %{name}-make.patch | |
28 | Patch3: %{name}-outoftree.patch | |
9b858b8d | 29 | URL: http://www.riverbankcomputing.co.uk/software/qscintilla/ |
d86befc1 | 30 | %if %{with python2} |
43763721 | 31 | BuildRequires: python-PyQt4-devel >= 4.8.2 |
d86befc1 JB |
32 | BuildRequires: python-sip-devel >= 2:%{sip_ver} |
33 | %endif | |
34 | %if %{with python3} | |
35 | BuildRequires: python3-PyQt4-devel >= 4.8.2 | |
36 | BuildRequires: python3-sip-devel >= 2:%{sip_ver} | |
37 | %endif | |
9ee0f3af | 38 | BuildRequires: rpm-pythonprov |
2b7936b6 | 39 | BuildRequires: rpmbuild(macros) >= 1.558 |
d86befc1 JB |
40 | %if %{with qt4} |
41 | BuildRequires: QtDesigner-devel >= 4.8 | |
42 | BuildRequires: QtGui-devel >= 4.8 | |
43 | BuildRequires: qt4-build >= 4.8 | |
44 | BuildRequires: qt4-qmake >= 4.8 | |
45 | %endif | |
46 | %if %{with qt5} | |
47 | BuildRequires: Qt5Designer-devel >= 5 | |
48 | BuildRequires: Qt5Gui-devel >= 5 | |
49 | BuildRequires: qt5-build >= 5 | |
50 | BuildRequires: qt5-qmake >= 5 | |
51 | %endif | |
52 | BuildConflicts: qscintilla2-devel | |
9ee0f3af KK |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
54 | ||
55 | %define _sipfilesdir %{_datadir}/sip | |
56 | ||
57 | %description | |
58 | QScintilla2 is a port to Qt of the Scintilla editing component. | |
59 | This version of QScintilla is based on Scintilla v%{scintilla_ver}. | |
60 | ||
d2b29e31 | 61 | %description -l pl.UTF-8 |
23949924 JB |
62 | QScintilla2 to port komponentu edytora Scintilla dla biblioteki Qt. |
63 | Ta wersja QScintilli jest oparta na Scintilli %{scintilla_ver}. | |
64 | ||
9ee0f3af KK |
65 | %package devel |
66 | Summary: Development files for the QScintilla2 | |
0bd4b1b2 | 67 | Summary(pl.UTF-8): Pliki nagłówkowe dla komponentu QScintilla2 |
9ee0f3af KK |
68 | Group: X11/Development/Libraries |
69 | Requires: %{name} = %{version}-%{release} | |
70 | Requires: QtGui-devel | |
71 | ||
72 | %description devel | |
73 | This package contains the header files necessary to develop | |
439a2c93 | 74 | applications using QScintilla2. |
9ee0f3af | 75 | |
d2b29e31 JR |
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. | |
23949924 | 79 | |
9ee0f3af KK |
80 | %package -n QtDesigner-plugin-%{name} |
81 | Summary: QScintilla2 plugin for Qt Designer | |
0bd4b1b2 | 82 | Summary(pl.UTF-8): Wtyczka QScintilla2 dla Qt Designera |
9ee0f3af KK |
83 | Group: X11/Development/Libraries |
84 | Requires: %{name} = %{version}-%{release} | |
85 | Requires: QtDesigner | |
86 | ||
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. | |
90 | ||
d2b29e31 JR |
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 | |
23949924 JB |
94 | Qt. |
95 | ||
9ee0f3af KK |
96 | %package -n python-%{name} |
97 | Summary: Python bindings for the QScintilla2 | |
0bd4b1b2 | 98 | Summary(pl.UTF-8): Wiązania Pythona dla komponentu QScintilla2 |
9ee0f3af KK |
99 | Group: Libraries/Python |
100 | Requires: %{name} = %{version}-%{release} | |
d86befc1 | 101 | %requires_ge python-PyQt4 |
9ee0f3af KK |
102 | |
103 | %description -n python-%{name} | |
104 | Python bindings for the QScintilla2. | |
105 | ||
d2b29e31 JR |
106 | %description -n python-%{name} -l pl.UTF-8 |
107 | Wiązania Pythona dla komponentu QScintilla2. | |
23949924 | 108 | |
9ee0f3af KK |
109 | %package -n python-%{name}-devel |
110 | Summary: Python bindings for the QScintilla2 - development files | |
0bd4b1b2 | 111 | Summary(pl.UTF-8): Wiązania Pythona dla komponentu QScintilla2 - pliki programistyczne |
9ee0f3af KK |
112 | Group: Development/Languages/Python |
113 | Requires: python-%{name} = %{version}-%{release} | |
9a281e92 | 114 | Requires: python-PyQt4-devel >= 4.8.2 |
9ee0f3af KK |
115 | |
116 | %description -n python-%{name}-devel | |
117 | Python bindings for the QScintilla2 - development files. | |
118 | ||
d2b29e31 JR |
119 | %description -n python-%{name}-devel -l pl.UTF-8 |
120 | Wiązania Pythona dla komponentu QScintilla2 - pliki programistyczne. | |
23949924 | 121 | |
9ee0f3af | 122 | %prep |
db7bb55a | 123 | %setup -q -n QScintilla-gpl-%{version} |
9ee0f3af | 124 | %patch0 -p1 |
d86befc1 JB |
125 | %patch1 -p1 |
126 | %patch2 -p1 | |
127 | %patch3 -p1 | |
9ee0f3af KK |
128 | |
129 | %build | |
d86befc1 JB |
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 | |
439a2c93 | 134 | %{__make} |
d86befc1 JB |
135 | cd ../designer-Qt4Qt5 |
136 | qmake-${qt} ../../designer-Qt4Qt5/designer.pro | |
9ee0f3af | 137 | %{__make} |
d86befc1 | 138 | cd .. |
9ee0f3af | 139 | |
d86befc1 JB |
140 | %if %{with python2} |
141 | cd Python2 | |
47f45644 JB |
142 | # setup PATH to get proper qmake |
143 | # pass --apidir because configure.py default is inconsistent with sources (no /qsci subdir) | |
d86befc1 JB |
144 | PATH=%{_libdir}/${qt}/bin:$PATH \ |
145 | %{__python} ../../Python/configure.py \ | |
146 | --verbose \ | |
9ee0f3af | 147 | -c -j 3 \ |
d86befc1 | 148 | -n ../../Qt4Qt5 \ |
47f45644 | 149 | -o ../Qt4Qt5 \ |
d86befc1 | 150 | --apidir=%{_datadir}/${qt}/qsci |
9ee0f3af | 151 | %{__make} |
d86befc1 JB |
152 | cd .. |
153 | %endif | |
154 | %if %{with python3} | |
155 | cd Python3 | |
156 | PATH=%{_libdir}/${qt}/bin:$PATH \ | |
157 | %{__python3} ../../Python/configure.py \ | |
158 | --verbose \ | |
159 | -c -j 3 \ | |
160 | -n ../../Qt4Qt5 \ | |
161 | -o ../Qt4Qt5 \ | |
162 | --apidir=%{_datadir}/${qt}/qsci | |
163 | %{__make} | |
164 | cd .. | |
165 | %endif | |
166 | cd .. | |
167 | done | |
9ee0f3af KK |
168 | |
169 | %install | |
170 | rm -rf $RPM_BUILD_ROOT | |
d86befc1 | 171 | #install -d $RPM_BUILD_ROOT%{_datadir}/qt5/qsci/api |
9ee0f3af | 172 | |
d86befc1 JB |
173 | for qt in %{?with_qt4:qt4} %{?with_qt5:qt5} ; do |
174 | %{__make} -C build-${qt}/Qt4Qt5 install \ | |
9ee0f3af | 175 | INSTALL_ROOT=$RPM_BUILD_ROOT |
d86befc1 | 176 | %{__make} -C build-${qt}/designer-Qt4Qt5 install \ |
9ee0f3af | 177 | INSTALL_ROOT=$RPM_BUILD_ROOT |
d86befc1 JB |
178 | %if %{with python3} |
179 | %{__make} -C build-${qt}/Python3 install \ | |
47f45644 | 180 | INSTALL_ROOT=$RPM_BUILD_ROOT |
d86befc1 JB |
181 | %endif |
182 | %if %{with python2} | |
183 | %{__make} -C build-${qt}/Python2 install \ | |
184 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
185 | %endif | |
186 | done | |
9ee0f3af KK |
187 | |
188 | for file in $RPM_BUILD_ROOT%{_datadir}/locale/*.qm | |
189 | do | |
23949924 JB |
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 | |
9ee0f3af KK |
194 | done |
195 | ||
47f45644 | 196 | # unnecessary symlink |
d86befc1 | 197 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libqscintilla2.so.11.3 |
47f45644 | 198 | |
9ee0f3af KK |
199 | %clean |
200 | rm -rf $RPM_BUILD_ROOT | |
201 | ||
202 | %post -p /sbin/ldconfig | |
203 | %postun -p /sbin/ldconfig | |
204 | ||
205 | %files | |
206 | %defattr(644,root,root,755) | |
ece58d84 | 207 | %doc GPL_EXCEPTION.TXT NEWS OPENSOURCE-NOTICE.TXT README |
9ee0f3af | 208 | %attr(755,root,root) %{_libdir}/libqscintilla2.so.*.*.* |
47f45644 | 209 | %attr(755,root,root) %ghost %{_libdir}/libqscintilla2.so.11 |
739c851d | 210 | %lang(cs) %{_datadir}/locale/cs/LC_MESSAGES/qscintilla2.qm |
9ee0f3af | 211 | %lang(de) %{_datadir}/locale/de/LC_MESSAGES/qscintilla2.qm |
12a74d0d | 212 | %lang(es) %{_datadir}/locale/es/LC_MESSAGES/qscintilla2.qm |
9ee0f3af KK |
213 | %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/qscintilla2.qm |
214 | %lang(pt_BR) %{_datadir}/locale/pt_BR/LC_MESSAGES/qscintilla2.qm | |
82fa3613 KK |
215 | %dir %{_datadir}/qt4/qsci |
216 | %dir %{_datadir}/qt4/qsci/api | |
d129dfdf JR |
217 | %dir %{_datadir}/qt5/qsci |
218 | %dir %{_datadir}/qt5/qsci/api | |
9ee0f3af KK |
219 | |
220 | %files devel | |
221 | %defattr(644,root,root,755) | |
222 | %doc doc/Scintilla/* | |
223 | %attr(755,root,root) %{_libdir}/libqscintilla2.so | |
224 | %{_includedir}/qt4/Qsci | |
d86befc1 | 225 | %{_datadir}/qt4/mkspecs/features/qscintilla2.prf |
9ee0f3af KK |
226 | |
227 | %files -n QtDesigner-plugin-%{name} | |
9a281e92 | 228 | %defattr(644,root,root,755) |
ece58d84 | 229 | %attr(755,root,root) %{_libdir}/qt4/plugins/designer/libqscintillaplugin.so |
9ee0f3af KK |
230 | |
231 | %files -n python-%{name} | |
232 | %defattr(644,root,root,755) | |
ece58d84 JB |
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 | |
9ee0f3af KK |
237 | |
238 | %files -n python-%{name}-devel | |
239 | %defattr(644,root,root,755) | |
240 | %{_sipfilesdir}/PyQt4/Qsci |