]>
Commit | Line | Data |
---|---|---|
83d12dcb | 1 | # TODO: qml plugin for qt5 |
f733a8fb JB |
2 | # |
3 | # Conditional build: | |
83d12dcb JB |
4 | %bcond_without python # Python (PySide) binding for Qt4 library |
5 | %bcond_without qt4 # Qt4 library | |
6 | %bcond_without qt5 # Qt5 library | |
f733a8fb | 7 | # |
5217a5c9 JB |
8 | Summary: Qt utility library for GEGL |
9 | Summary(pl.UTF-8): Biblioteka narzędziowa Qt dla biblioteki GEGL | |
10 | Name: gegl-qt | |
11 | Version: 0.0.7 | |
12 | Release: 1 | |
13 | License: LGPL v3+ | |
14 | Group: Libraries | |
15 | Source0: ftp://ftp.gimp.org/pub/gegl-qt/0.0/%{name}-%{version}.tar.bz2 | |
16 | # Source0-md5: fbb0692af354d404615980a68c8a88f4 | |
17 | # git diff 0.0.7 4f46898e7dfaade23553f167bb03caf95171c0e7 (before switch to gegl 0.3) | |
18 | # (then adjusted to apply on dist tarball) | |
19 | Patch0: %{name}-git.patch | |
f733a8fb | 20 | Patch1: %{name}-shiboken.patch |
83d12dcb JB |
21 | Patch2: %{name}-qmake.patch |
22 | Patch3: %{name}-qt5.patch | |
5217a5c9 | 23 | URL: http://www.gegl.org/ |
83d12dcb JB |
24 | %if %{with qt4} |
25 | BuildRequires: QtCore-devel >= 4 | |
26 | BuildRequires: QtDeclarative-devel >= 4 | |
27 | BuildRequires: QtGui-devel >= 4 | |
28 | %endif | |
29 | %if %{with qt5} | |
30 | BuildRequires: Qt5Core-devel >= 5 | |
31 | BuildRequires: Qt5Declarative-devel >= 5 | |
32 | BuildRequires: Qt5Gui-devel >= 5 | |
33 | BuildRequires: Qt5Widgets-devel >= 5 | |
34 | %endif | |
5217a5c9 JB |
35 | BuildRequires: doxygen |
36 | BuildRequires: gegl-devel >= 0.2.0 | |
37 | BuildRequires: pkgconfig | |
83d12dcb JB |
38 | %{?with_qt4:BuildRequires: qt4-qmake >= 4} |
39 | %{?with_qt5:BuildRequires: qt5-qmake >= 5} | |
f733a8fb JB |
40 | BuildRequires: rpmbuild(macros) >= 1.219 |
41 | BuildRequires: texlive-format-pdflatex | |
167d8b87 | 42 | BuildRequires: texlive-latex-extend |
f733a8fb JB |
43 | %if %{with python} |
44 | BuildRequires: python-PySide-devel | |
45 | BuildRequires: shiboken | |
46 | %endif | |
5217a5c9 JB |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
49 | %description | |
50 | Qt utility library for GEGL. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Biblioteka narzędziowa Qt dla biblioteki GEGL. | |
54 | ||
55 | %package -n gegl-qt4 | |
56 | Summary: Qt 4 utility library for GEGL | |
83d12dcb | 57 | Summary(pl.UTF-8): Biblioteka narzędziowa Qt 4 dla biblioteki GEGL |
5217a5c9 JB |
58 | Group: X11/Libraries |
59 | Requires: gegl >= 0.2.0 | |
60 | ||
61 | %description -n gegl-qt4 | |
62 | Qt 4 utility library for GEGL. | |
63 | ||
64 | %description -n gegl-qt4 -l pl.UTF-8 | |
65 | Biblioteka narzędziowa Qt 4 dla biblioteki GEGL. | |
66 | ||
67 | %package -n gegl-qt4-devel | |
68 | Summary: Header files for gegl-qt4 library | |
69 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gegl-qt4 | |
70 | Group: Development/Libraries | |
83d12dcb JB |
71 | Requires: QtCore-devel >= 4 |
72 | Requires: QtDeclarative-devel >= 4 | |
73 | Requires: QtGui-devel >= 4 | |
5217a5c9 JB |
74 | Requires: gegl-qt4 = %{version}-%{release} |
75 | Requires: gegl-devel >= 0.2.0 | |
76 | ||
77 | %description -n gegl-qt4-devel | |
78 | Header files for gegl-qt4 library. | |
79 | ||
80 | %description -n gegl-qt4-devel -l pl.UTF-8 | |
81 | Pliki nagłówkowe biblioteki gegl-qt4. | |
82 | ||
f733a8fb JB |
83 | %package -n python-gegl-qt4 |
84 | Summary: Python (PySide) binding for gegl-qt4 library | |
85 | Summary(pl.UTF-8): Wiązania Pythona (PySide) do biblioteki gegl-qt4 | |
86 | Group: Libraries/Python | |
87 | Requires: gegl-qt4 = %{version}-%{release} | |
88 | Requires: python-PySide | |
89 | ||
90 | %description -n python-gegl-qt4 | |
91 | Python (PySide) binding for gegl-qt4 library. | |
92 | ||
93 | %description -n python-gegl-qt4 -l pl.UTF-8 | |
94 | Wiązania Pythona (PySide) do biblioteki gegl-qt4. | |
95 | ||
83d12dcb JB |
96 | %package -n gegl-qt5 |
97 | Summary: Qt 5 utility library for GEGL | |
98 | Summary(pl.UTF-8): Biblioteka narzędziowa Qt 5 dla biblioteki GEGL | |
99 | Group: X11/Libraries | |
100 | Requires: gegl >= 0.2.0 | |
101 | ||
102 | %description -n gegl-qt5 | |
103 | Qt 5 utility library for GEGL. | |
104 | ||
105 | %description -n gegl-qt5 -l pl.UTF-8 | |
106 | Biblioteka narzędziowa Qt 5 dla biblioteki GEGL. | |
107 | ||
108 | %package -n gegl-qt5-devel | |
109 | Summary: Header files for gegl-qt5 library | |
110 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gegl-qt5 | |
111 | Group: Development/Libraries | |
112 | Requires: Qt5Core-devel >= 5 | |
113 | Requires: Qt5Declarative-devel >= 5 | |
114 | Requires: Qt5Gui-devel >= 5 | |
115 | Requires: gegl-qt5 = %{version}-%{release} | |
116 | Requires: gegl-devel >= 0.2.0 | |
117 | ||
118 | %description -n gegl-qt5-devel | |
119 | Header files for gegl-qt5 library. | |
120 | ||
121 | %description -n gegl-qt5-devel -l pl.UTF-8 | |
122 | Pliki nagłówkowe biblioteki gegl-qt5. | |
123 | ||
5217a5c9 JB |
124 | %package apidocs |
125 | Summary: gegl library API documentation | |
126 | Summary(pl.UTF-8): Dokumentacja API biblioteki gegl | |
127 | Group: Documentation | |
128 | Requires: gtk-doc-common | |
129 | ||
130 | %description apidocs | |
131 | gegl library API documentation. | |
132 | ||
133 | %description apidocs -l pl.UTF-8 | |
134 | Dokumentacja API biblioteki gegl. | |
135 | ||
136 | %prep | |
137 | %setup -q | |
138 | %patch0 -p1 | |
f733a8fb | 139 | %patch1 -p1 |
83d12dcb JB |
140 | %patch2 -p1 |
141 | %patch3 -p1 | |
5217a5c9 JB |
142 | |
143 | %build | |
83d12dcb JB |
144 | %if %{with qt4} |
145 | install -d build-qt4 | |
146 | cd build-qt4 | |
147 | qmake-qt4 ../gegl-qt.pro \ | |
5217a5c9 JB |
148 | QMAKE_CXX="%{__cxx}" \ |
149 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
f733a8fb JB |
150 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" \ |
151 | %{!?with_python:HAVE_PYSIDE=no} | |
5217a5c9 JB |
152 | |
153 | %{__make} | |
83d12dcb JB |
154 | cd .. |
155 | ln -snf build-qt4 build | |
156 | %endif | |
157 | ||
158 | %if %{with qt5} | |
159 | install -d build-qt5 | |
160 | cd build-qt5 | |
161 | qmake-qt5 ../gegl-qt.pro \ | |
162 | QMAKE_CXX="%{__cxx}" \ | |
163 | QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \ | |
164 | QMAKE_LFLAGS_RELEASE="%{rpmldflags}" | |
165 | ||
166 | %{__make} | |
167 | cd .. | |
168 | test -L build || ln -snf build-qt5 build | |
169 | %endif | |
5217a5c9 JB |
170 | |
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
83d12dcb JB |
174 | %if %{with qt4} |
175 | %{__make} -C build-qt4 install \ | |
5217a5c9 JB |
176 | INSTALL_ROOT=$RPM_BUILD_ROOT |
177 | ||
f733a8fb JB |
178 | # extraneous symlink |
179 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgegl-qt4-0.1.so.0.0 | |
180 | ||
181 | %if %{with python} | |
182 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
183 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
184 | %py_postclean | |
185 | %endif | |
83d12dcb JB |
186 | %endif |
187 | ||
188 | %if %{with qt5} | |
189 | %{__make} -C build-qt5 install \ | |
190 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
191 | ||
192 | # extraneous symlink | |
193 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgegl-qt5-0.1.so.0.0 | |
194 | %endif | |
f733a8fb | 195 | |
5217a5c9 JB |
196 | %clean |
197 | rm -rf $RPM_BUILD_ROOT | |
198 | ||
199 | %post -p /sbin/ldconfig | |
200 | %postun -p /sbin/ldconfig | |
201 | ||
83d12dcb | 202 | %if %{with qt4} |
5217a5c9 JB |
203 | %files -n gegl-qt4 |
204 | %defattr(644,root,root,755) | |
205 | %doc README.txt | |
206 | %attr(755,root,root) %{_libdir}/libgegl-qt4-0.1.so.*.*.* | |
207 | %attr(755,root,root) %ghost %{_libdir}/libgegl-qt4-0.1.so.0 | |
208 | %attr(755,root,root) %{_libdir}/gegl-0.2/libgegl-qt4-display.so | |
209 | %dir %{_libdir}/qt4/imports/GeglQt4 | |
210 | %attr(755,root,root) %{_libdir}/qt4/imports/GeglQt4/libgegl-qt4-0.1.so | |
211 | %{_libdir}/qt4/imports/GeglQt4/qmldir | |
212 | ||
213 | %files -n gegl-qt4-devel | |
214 | %defattr(644,root,root,755) | |
215 | %attr(755,root,root) %{_libdir}/libgegl-qt4-0.1.so | |
216 | %{_includedir}/gegl-qt4-0.1 | |
217 | %{_pkgconfigdir}/gegl-qt4-0.1.pc | |
218 | ||
f733a8fb JB |
219 | %if %{with python} |
220 | %files -n python-gegl-qt4 | |
221 | %defattr(644,root,root,755) | |
222 | %attr(755,root,root) %{py_sitedir}/gegl-qt4-0.1/geglqt.so | |
223 | %{py_sitedir}/pygeglqt4.py[co] | |
224 | %endif | |
83d12dcb JB |
225 | %endif |
226 | ||
227 | %if %{with qt5} | |
228 | %files -n gegl-qt5 | |
229 | %defattr(644,root,root,755) | |
230 | %doc README.txt | |
231 | %attr(755,root,root) %{_libdir}/libgegl-qt5-0.1.so.*.*.* | |
232 | %attr(755,root,root) %ghost %{_libdir}/libgegl-qt5-0.1.so.0 | |
233 | %attr(755,root,root) %{_libdir}/gegl-0.2/libgegl-qt5-display.so | |
234 | # not ready for qt5 plugin format (_disabled in qt5 patch) | |
235 | #%dir %{_libdir}/qt4/imports/GeglQt4 | |
236 | #%attr(755,root,root) %{_libdir}/qt4/imports/GeglQt4/libgegl-qt4-0.1.so | |
237 | #%{_libdir}/qt4/imports/GeglQt4/qmldir | |
238 | ||
239 | %files -n gegl-qt5-devel | |
240 | %defattr(644,root,root,755) | |
241 | %attr(755,root,root) %{_libdir}/libgegl-qt5-0.1.so | |
242 | %{_includedir}/gegl-qt5-0.1 | |
243 | %{_pkgconfigdir}/gegl-qt5-0.1.pc | |
244 | %endif | |
f733a8fb | 245 | |
5217a5c9 JB |
246 | %files apidocs |
247 | %defattr(644,root,root,755) | |
83d12dcb | 248 | %doc build/doc/html/* |