]> git.pld-linux.org Git - packages/qscintilla2.git/blame - qscintilla2.spec
- updated to 2.8.4
[packages/qscintilla2.git] / qscintilla2.spec
CommitLineData
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 16Summary: QScintilla2 - a port to Qt of the Scintilla editing component
0bd4b1b2 17Summary(pl.UTF-8): QScintilla2 - port komponentu edytora Scintilla dla biblioteki Qt
9ee0f3af 18Name: qscintilla2
d86befc1
JB
19Version: 2.8.4
20Release: 1
ece58d84 21License: GPL v2 or GPL v3 with Riverbank GPL Exception v1.1
9ee0f3af 22Group: X11/Libraries
69587943 23Source0: http://downloads.sourceforge.net/pyqt/QScintilla-gpl-%{version}.tar.gz
d86befc1 24# Source0-md5: 28aec903ff48ae541295a4fb9c96f8ea
9b858b8d 25Patch0: %{name}-internal_build.patch
d86befc1
JB
26Patch1: %{name}-multiqt.patch
27Patch2: %{name}-make.patch
28Patch3: %{name}-outoftree.patch
9b858b8d 29URL: http://www.riverbankcomputing.co.uk/software/qscintilla/
d86befc1 30%if %{with python2}
43763721 31BuildRequires: python-PyQt4-devel >= 4.8.2
d86befc1
JB
32BuildRequires: python-sip-devel >= 2:%{sip_ver}
33%endif
34%if %{with python3}
35BuildRequires: python3-PyQt4-devel >= 4.8.2
36BuildRequires: python3-sip-devel >= 2:%{sip_ver}
37%endif
9ee0f3af 38BuildRequires: rpm-pythonprov
2b7936b6 39BuildRequires: rpmbuild(macros) >= 1.558
d86befc1
JB
40%if %{with qt4}
41BuildRequires: QtDesigner-devel >= 4.8
42BuildRequires: QtGui-devel >= 4.8
43BuildRequires: qt4-build >= 4.8
44BuildRequires: qt4-qmake >= 4.8
45%endif
46%if %{with qt5}
47BuildRequires: Qt5Designer-devel >= 5
48BuildRequires: Qt5Gui-devel >= 5
49BuildRequires: qt5-build >= 5
50BuildRequires: qt5-qmake >= 5
51%endif
52BuildConflicts: qscintilla2-devel
9ee0f3af
KK
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55%define _sipfilesdir %{_datadir}/sip
56
57%description
58QScintilla2 is a port to Qt of the Scintilla editing component.
59This version of QScintilla is based on Scintilla v%{scintilla_ver}.
60
d2b29e31 61%description -l pl.UTF-8
23949924
JB
62QScintilla2 to port komponentu edytora Scintilla dla biblioteki Qt.
63Ta wersja QScintilli jest oparta na Scintilli %{scintilla_ver}.
64
9ee0f3af
KK
65%package devel
66Summary: Development files for the QScintilla2
0bd4b1b2 67Summary(pl.UTF-8): Pliki nagłówkowe dla komponentu QScintilla2
9ee0f3af
KK
68Group: X11/Development/Libraries
69Requires: %{name} = %{version}-%{release}
70Requires: QtGui-devel
71
72%description devel
73This package contains the header files necessary to develop
439a2c93 74applications using QScintilla2.
9ee0f3af 75
d2b29e31
JR
76%description devel -l pl.UTF-8
77Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
78użyciem komponentu QScintilla2.
23949924 79
9ee0f3af
KK
80%package -n QtDesigner-plugin-%{name}
81Summary: QScintilla2 plugin for Qt Designer
0bd4b1b2 82Summary(pl.UTF-8): Wtyczka QScintilla2 dla Qt Designera
9ee0f3af
KK
83Group: X11/Development/Libraries
84Requires: %{name} = %{version}-%{release}
85Requires: QtDesigner
86
87%description -n QtDesigner-plugin-%{name}
88QScintilla2 plugin for Qt Designer that allows QScintilla instances
89to be included in GUI designs just like any other Qt widget.
90
d2b29e31
JR
91%description -n QtDesigner-plugin-%{name} -l pl.UTF-8
92Wtyczka WScintilla2 dla Qt Designera pozwalająca na włączanie
93instancji QScintilli w projekty GUI w ten sam sposób, co inne widgety
23949924
JB
94Qt.
95
9ee0f3af
KK
96%package -n python-%{name}
97Summary: Python bindings for the QScintilla2
0bd4b1b2 98Summary(pl.UTF-8): Wiązania Pythona dla komponentu QScintilla2
9ee0f3af
KK
99Group: Libraries/Python
100Requires: %{name} = %{version}-%{release}
d86befc1 101%requires_ge python-PyQt4
9ee0f3af
KK
102
103%description -n python-%{name}
104Python bindings for the QScintilla2.
105
d2b29e31
JR
106%description -n python-%{name} -l pl.UTF-8
107Wiązania Pythona dla komponentu QScintilla2.
23949924 108
9ee0f3af
KK
109%package -n python-%{name}-devel
110Summary: Python bindings for the QScintilla2 - development files
0bd4b1b2 111Summary(pl.UTF-8): Wiązania Pythona dla komponentu QScintilla2 - pliki programistyczne
9ee0f3af
KK
112Group: Development/Languages/Python
113Requires: python-%{name} = %{version}-%{release}
9a281e92 114Requires: python-PyQt4-devel >= 4.8.2
9ee0f3af
KK
115
116%description -n python-%{name}-devel
117Python bindings for the QScintilla2 - development files.
118
d2b29e31
JR
119%description -n python-%{name}-devel -l pl.UTF-8
120Wią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
130for qt in %{?with_qt4:qt4} %{?with_qt5:qt5} ; do
131install -d build-${qt}/{Qt4Qt5,designer-Qt4Qt5,Python2,Python3}
132cd build-${qt}/Qt4Qt5
133qmake-${qt} ../../Qt4Qt5/qscintilla.pro
439a2c93 134%{__make}
d86befc1
JB
135cd ../designer-Qt4Qt5
136qmake-${qt} ../../designer-Qt4Qt5/designer.pro
9ee0f3af 137%{__make}
d86befc1 138cd ..
9ee0f3af 139
d86befc1
JB
140%if %{with python2}
141cd 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
144PATH=%{_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
152cd ..
153%endif
154%if %{with python3}
155cd Python3
156PATH=%{_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}
164cd ..
165%endif
166cd ..
167done
9ee0f3af
KK
168
169%install
170rm -rf $RPM_BUILD_ROOT
d86befc1 171#install -d $RPM_BUILD_ROOT%{_datadir}/qt5/qsci/api
9ee0f3af 172
d86befc1
JB
173for 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
186done
9ee0f3af
KK
187
188for file in $RPM_BUILD_ROOT%{_datadir}/locale/*.qm
189do
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
194done
195
47f45644 196# unnecessary symlink
d86befc1 197%{__rm} $RPM_BUILD_ROOT%{_libdir}/libqscintilla2.so.11.3
47f45644 198
9ee0f3af
KK
199%clean
200rm -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
This page took 0.066871 seconds and 4 git commands to generate.