]>
Commit | Line | Data |
---|---|---|
578af9cd | 1 | # |
47dc788b | 2 | # Conditional build: |
73129f67 | 3 | %bcond_without apidocs # API documentation |
0f09eec7 | 4 | %bcond_without luajit # LuaJIT implementation of lua 5.1 |
73129f67 JB |
5 | %bcond_without static_libs # static libraries |
6 | %bcond_without glade # glade catalog file packaging | |
7 | %bcond_without lua # Lua (5.1) loader | |
8 | %bcond_without python2 # Python 2.x loader | |
9 | %bcond_without python3 # Python 3.x loader | |
5ec00cd5 | 10 | |
fe77c428 MB |
11 | # luajit is not supported on x32 |
12 | %ifarch x32 | |
13 | %undefine with_luajit | |
14 | %endif | |
15 | ||
47dc788b AF |
16 | Summary: GObject Plugin System |
17 | Summary(pl.UTF-8): System wtyczek GObject | |
18 | Name: libpeas | |
9aa0dd3e | 19 | Version: 1.26.0 |
35bb21e7 | 20 | Release: 1 |
73129f67 | 21 | License: LGPL v2.1+ |
47dc788b | 22 | Group: Libraries |
9aa0dd3e JP |
23 | Source0: http://ftp.gnome.org/pub/GNOME/sources/libpeas/1.26/%{name}-%{version}.tar.xz |
24 | # Source0-md5: f7723bf8433b7984121157e1e9a629b5 | |
73129f67 JB |
25 | Patch0: %{name}-tests-with-static.patch |
26 | Patch1: %{name}-gtkdocdir.patch | |
f8e4a2fe | 27 | URL: https://wiki.gnome.org/Libpeas |
2afd22e9 | 28 | BuildRequires: gettext-tools >= 0.17 |
85b97cae | 29 | %{?with_glade:BuildRequires: glade-devel >= 2.0} |
3357d252 | 30 | BuildRequires: glib2-devel >= 1:2.38.0 |
8d430993 | 31 | BuildRequires: gobject-introspection-devel >= 1.40.0 |
47dc788b | 32 | BuildRequires: gtk+3-devel >= 3.0.0 |
578af9cd MB |
33 | BuildRequires: gtk-doc >= 1.11 |
34 | BuildRequires: intltool >= 0.40.0 | |
73129f67 JB |
35 | %if %{with lua} |
36 | BuildRequires: lua-lgi >= 0.9.0 | |
0f09eec7 JB |
37 | %{!?with_luajit:BuildRequires: lua51-devel >= 5.1.0} |
38 | %{?with_luajit:BuildRequires: luajit-devel >= 2.0} | |
73129f67 JB |
39 | %endif |
40 | BuildRequires: meson >= 0.49.0 | |
41 | BuildRequires: ninja >= 1.5 | |
42 | %if %{with python2} | |
43 | BuildRequires: python-devel >= 1:2.5.2 | |
3357d252 | 44 | BuildRequires: python-pygobject3-devel >= 3.2.0 |
73129f67 JB |
45 | %endif |
46 | %if %{with python3} | |
f6bd8af1 | 47 | BuildRequires: python3-devel >= 1:3.2.0 |
73129f67 JB |
48 | BuildRequires: python3-pygobject3-devel >= 3.2.0 |
49 | %endif | |
578af9cd | 50 | BuildRequires: rpmbuild(macros) >= 1.601 |
6bc13e2b | 51 | BuildRequires: tar >= 1:1.22 |
6bc13e2b | 52 | BuildRequires: xz |
73129f67 | 53 | %{!?with_luajit:BuildConflicts: luajit-devel} |
821a2573 JB |
54 | Requires: glib2 >= 1:2.38.0 |
55 | Requires: gobject-introspection >= 1.40.0 | |
8d430993 | 56 | Obsoletes: libpeas-loader-gjs < 1.10.0 |
d241ba08 | 57 | Obsoletes: libpeas-loader-seed < 1.14.0 |
47dc788b AF |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
60 | %description | |
578af9cd MB |
61 | libpeas is a gobject-based plugins engine, and is targetted at giving |
62 | every application the chance to assume its own extensibility. It also | |
47dc788b | 63 | has a set of features including, but not limited to: |
47dc788b | 64 | - multiple extension points |
d0b66b0f | 65 | - on demand (lazy) programming language support for C, Python and Lua |
578af9cd | 66 | - simplicity of the API |
47dc788b | 67 | |
85b97cae JB |
68 | %description -l pl.UTF-8 |
69 | libpeas to silnik wtyczek oparty na bibliotece GObject; jego celem | |
70 | jest zapewnienie każdej aplikacji własnej rozszerzalności. Ma także | |
71 | pewien zbiór możliwości, w tym: | |
72 | - wiele punktów rozszerzeń | |
d0b66b0f | 73 | - wsparcie dla leniwego programowania dla języków C, Python i Lua |
85b97cae JB |
74 | - prostota API |
75 | ||
3357d252 ŁK |
76 | %package loader-lua |
77 | Summary: Lua loader for libpeas library | |
78 | Summary(pl.UTF-8): Moduł ładujący dla języka Lua do biblioteki libpeas | |
79 | Group: Libraries | |
80 | Requires: %{name} = %{version}-%{release} | |
2fd80e29 | 81 | Requires: lua-lgi |
3357d252 ŁK |
82 | |
83 | %description loader-lua | |
84 | Lua loader for libpeas library. | |
85 | ||
86 | %description loader-lua -l pl.UTF-8 | |
87 | Moduł ładujący dla języka Lua do biblioteki libpeas. | |
88 | ||
5f8b5c56 | 89 | %package loader-python |
85b97cae JB |
90 | Summary: Python 2.x loader for libpeas library |
91 | Summary(pl.UTF-8): Moduł ładujący dla Pythona 2.x do biblioteki libpeas | |
5f8b5c56 AF |
92 | Group: Libraries |
93 | Requires: %{name} = %{version}-%{release} | |
18311bc3 | 94 | Requires: python-libs >= 1:2.5.2 |
5f8b5c56 | 95 | |
d82c47a8 | 96 | %description loader-python |
85b97cae JB |
97 | Python 2.x loader for libpeas library. |
98 | ||
99 | %description loader-python -l pl.UTF-8 | |
100 | Moduł ładujący dla Pythona 2.x do biblioteki libpeas. | |
5f8b5c56 | 101 | |
7531aa2f | 102 | %package loader-python3 |
85b97cae JB |
103 | Summary: Python 3.x loader for libpeas library |
104 | Summary(pl.UTF-8): Moduł ładujący dla Pythona 3.x do biblioteki libpeas | |
7531aa2f MB |
105 | Group: Libraries |
106 | Requires: %{name} = %{version}-%{release} | |
107 | ||
108 | %description loader-python3 | |
85b97cae JB |
109 | Python 3.x loader for libpeas library. |
110 | ||
111 | %description loader-python3 -l pl.UTF-8 | |
112 | Moduł ładujący dla Pythona 3.x do biblioteki libpeas. | |
7531aa2f | 113 | |
47dc788b AF |
114 | %package devel |
115 | Summary: Header files for libpeas library | |
116 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpeas | |
117 | Group: Development/Libraries | |
118 | Requires: %{name} = %{version}-%{release} | |
3357d252 | 119 | Requires: glib2-devel >= 1:2.38.0 |
18311bc3 | 120 | Requires: gobject-introspection-devel >= 1.40.0 |
47dc788b AF |
121 | |
122 | %description devel | |
123 | Header files for libpeas library. | |
124 | ||
125 | %description devel -l pl.UTF-8 | |
126 | Pliki nagłówkowe biblioteki libpeas. | |
127 | ||
128 | %package static | |
129 | Summary: Static libpeas library | |
130 | Summary(pl.UTF-8): Statyczna biblioteka libpeas | |
131 | Group: Development/Libraries | |
132 | Requires: %{name}-devel = %{version}-%{release} | |
133 | ||
134 | %description static | |
135 | Static libpeas library. | |
136 | ||
137 | %description static -l pl.UTF-8 | |
138 | Statyczna biblioteka libpeas. | |
139 | ||
140 | %package gtk | |
85b97cae JB |
141 | Summary: GObject Plugin System - GTK+ widgets |
142 | Summary(pl.UTF-8): System wtyczek GObject - widgety GTK+ | |
578af9cd | 143 | Group: X11/Libraries |
578af9cd | 144 | Requires(post,postun): gtk-update-icon-cache |
6bc13e2b | 145 | Requires: %{name} = %{version}-%{release} |
85b97cae | 146 | Requires: gtk+3 >= 3.0.0 |
578af9cd | 147 | Requires: hicolor-icon-theme |
47dc788b AF |
148 | |
149 | %description gtk | |
578af9cd MB |
150 | libpeas is a gobject-based plugins engine, and is targetted at giving |
151 | every application the chance to assume its own extensibility. It also | |
47dc788b | 152 | has a set of features including, but not limited to: |
47dc788b | 153 | - multiple extension points |
d0b66b0f | 154 | - on demand (lazy) programming language support for C, Python and Lua |
578af9cd | 155 | - simplicity of the API |
47dc788b | 156 | |
85b97cae JB |
157 | This package contains GTK+ widgets library. |
158 | ||
159 | %description gtk -l pl.UTF-8 | |
160 | libpeas to silnik wtyczek oparty na bibliotece GObject; jego celem | |
161 | jest zapewnienie każdej aplikacji własnej rozszerzalności. Ma także | |
162 | pewien zbiór możliwości, w tym: | |
163 | - wiele punktów rozszerzeń | |
d0b66b0f | 164 | - wsparcie dla leniwego programowania dla języków C, Python i Lua |
85b97cae JB |
165 | - prostota API |
166 | ||
167 | Ten pakiet zawiera bibliotekę widgetów GTK+. | |
168 | ||
47dc788b AF |
169 | %package gtk-devel |
170 | Summary: Header files for libpeas-gtk library | |
171 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libpeas-gtk | |
578af9cd MB |
172 | Group: X11/Development/Libraries |
173 | Requires: %{name}-devel = %{version}-%{release} | |
47dc788b | 174 | Requires: %{name}-gtk = %{version}-%{release} |
578af9cd | 175 | Requires: gtk+3-devel >= 3.0.0 |
47dc788b AF |
176 | |
177 | %description gtk-devel | |
178 | Header files for libpeas-gtk library. | |
179 | ||
180 | %description gtk-devel -l pl.UTF-8 | |
181 | Pliki nagłówkowe biblioteki libpeas-gtk. | |
182 | ||
85b97cae JB |
183 | %package gtk-glade |
184 | Summary: libpeas-gtk catalog file for Glade | |
185 | Summary(pl.UTF-8): Plik katalogu libpeas-gtk dla Glade | |
186 | Group: X11/Development/Libraries | |
187 | Requires: %{name}-gtk-devel = %{version}-%{release} | |
188 | Requires: glade >= 2.0 | |
189 | ||
190 | %description gtk-glade | |
191 | libpeas-gtk catalog file for Glade. | |
192 | ||
193 | %description gtk-glade -l pl.UTF-8 | |
194 | Plik katalogu libpeas-gtk dla Glade. | |
195 | ||
47dc788b AF |
196 | %package gtk-static |
197 | Summary: Static libpeas-gtk library | |
198 | Summary(pl.UTF-8): Statyczna biblioteka libpeas-gtk | |
578af9cd | 199 | Group: X11/Development/Libraries |
47dc788b AF |
200 | Requires: %{name}-devel = %{version}-%{release} |
201 | Requires: %{name}-gtk-devel = %{version}-%{release} | |
202 | ||
203 | %description gtk-static | |
204 | Static libpeas library. | |
205 | ||
206 | %description gtk-static -l pl.UTF-8 | |
207 | Statyczna biblioteka libpeas. | |
208 | ||
209 | %package apidocs | |
210 | Summary: libpeas API documentation | |
211 | Summary(pl.UTF-8): Dokumentacja API biblioteki libpeas | |
212 | Group: Documentation | |
578af9cd | 213 | Requires: gtk-doc-common |
5ec00cd5 ER |
214 | %if "%{_rpmversion}" >= "5" |
215 | BuildArch: noarch | |
216 | %endif | |
47dc788b AF |
217 | |
218 | %description apidocs | |
219 | API and internal documentation for libpeas library. | |
220 | ||
221 | %description apidocs -l pl.UTF-8 | |
222 | Dokumentacja API biblioteki libpeas. | |
223 | ||
224 | %package demo | |
225 | Summary: Demo application for libpeas | |
578af9cd MB |
226 | Summary(pl.UTF-8): Aplikacja demonstracyjna libpeas |
227 | Group: Applications | |
5f8b5c56 AF |
228 | Requires: %{name} = %{version}-%{release} |
229 | Requires: %{name}-gtk = %{version}-%{release} | |
73129f67 | 230 | %if %{with lua} |
d0b66b0f | 231 | Requires: %{name}-loader-lua = %{version}-%{release} |
73129f67 JB |
232 | %endif |
233 | %if %{with python3} | |
234 | Requires: %{name}-loader-python3 = %{version}-%{release} | |
235 | %endif | |
47dc788b AF |
236 | |
237 | %description demo | |
238 | Demo application for libpeas. | |
239 | ||
240 | %description demo -l pl.UTF-8 | |
241 | Aplikacja demonstracyjna libpeas. | |
242 | ||
243 | %prep | |
244 | %setup -q | |
73129f67 JB |
245 | %if %{with static_libs} |
246 | %patch0 -p1 | |
247 | %endif | |
248 | %patch1 -p1 | |
249 | ||
250 | %if %{with lua} | |
251 | # meson buildsystem expects .pc file for lua-lgi detection | |
252 | install -d fake-pkgconfig | |
253 | cat >fake-pkgconfig/lua5.1-lgi.pc <<'EOF' | |
254 | Name: lua-lgi | |
255 | Description: Lua LGI | |
256 | Version: %(rpm -q --qf '%%{V}\n' lua-lgi) | |
257 | EOF | |
258 | %endif | |
47dc788b AF |
259 | |
260 | %build | |
73129f67 JB |
261 | export PKG_CONFIG_PATH=$(pwd)/fake-pkgconfig |
262 | %meson build \ | |
263 | %{!?with_static_libs:--default-library=shared} \ | |
264 | %{!?with_glade:-Dglade_catalog=false} \ | |
265 | %{?with_apidocs:-Dgtk_doc=true} \ | |
266 | %{!?with_lua:-Dlua51=false} \ | |
267 | %{?with_python2:-Dpython2=true} \ | |
268 | %{!?with_python3:-Dpython3=false} \ | |
269 | -Dvapi=true | |
270 | ||
271 | %ninja_build -C build | |
47dc788b AF |
272 | |
273 | %install | |
274 | rm -rf $RPM_BUILD_ROOT | |
275 | ||
73129f67 | 276 | %ninja_install -C build |
47dc788b | 277 | |
73129f67 JB |
278 | %py3_comp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello |
279 | %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello | |
47dc788b | 280 | |
73129f67 | 281 | %find_lang libpeas-1.0 |
47dc788b AF |
282 | |
283 | %clean | |
284 | rm -rf $RPM_BUILD_ROOT | |
285 | ||
286 | %post -p /sbin/ldconfig | |
287 | %postun -p /sbin/ldconfig | |
578af9cd MB |
288 | |
289 | %post gtk | |
290 | /sbin/ldconfig | |
291 | %update_icon_cache hicolor | |
292 | ||
293 | %postun gtk | |
294 | /sbin/ldconfig | |
295 | %update_icon_cache hicolor | |
47dc788b | 296 | |
73129f67 | 297 | %files -f libpeas-1.0.lang |
47dc788b | 298 | %defattr(644,root,root,755) |
73129f67 | 299 | %doc AUTHORS NEWS README |
47dc788b AF |
300 | %attr(755,root,root) %{_libdir}/libpeas-1.0.so.*.*.* |
301 | %attr(755,root,root) %ghost %{_libdir}/libpeas-1.0.so.0 | |
047f0a18 PZ |
302 | %dir %{_libdir}/libpeas-1.0 |
303 | %dir %{_libdir}/libpeas-1.0/loaders | |
047f0a18 | 304 | %{_libdir}/girepository-1.0/Peas-1.0.typelib |
5f8b5c56 | 305 | |
73129f67 | 306 | %if %{with lua} |
3357d252 ŁK |
307 | %files loader-lua |
308 | %defattr(644,root,root,755) | |
2fd80e29 | 309 | %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/liblua51loader.so |
73129f67 | 310 | %endif |
3357d252 | 311 | |
73129f67 | 312 | %if %{with python2} |
5f8b5c56 AF |
313 | %files loader-python |
314 | %defattr(644,root,root,755) | |
35bb21e7 | 315 | %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpythonloader.so |
73129f67 | 316 | %endif |
5f8b5c56 | 317 | |
73129f67 | 318 | %if %{with python3} |
7531aa2f MB |
319 | %files loader-python3 |
320 | %defattr(644,root,root,755) | |
321 | %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpython3loader.so | |
73129f67 | 322 | %endif |
7531aa2f | 323 | |
47dc788b AF |
324 | %files devel |
325 | %defattr(644,root,root,755) | |
578af9cd | 326 | %attr(755,root,root) %{_libdir}/libpeas-1.0.so |
47dc788b AF |
327 | %{_includedir}/libpeas-1.0 |
328 | %{_pkgconfigdir}/libpeas-1.0.pc | |
329 | %{_datadir}/gir-1.0/Peas-1.0.gir | |
330 | ||
331 | %if %{with static_libs} | |
332 | %files static | |
333 | %defattr(644,root,root,755) | |
334 | %{_libdir}/libpeas-1.0.a | |
335 | %endif | |
336 | ||
337 | %files gtk | |
338 | %defattr(644,root,root,755) | |
339 | %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so.*.*.* | |
340 | %attr(755,root,root) %ghost %{_libdir}/libpeas-gtk-1.0.so.0 | |
341 | %{_libdir}/girepository-1.0/PeasGtk-1.0.typelib | |
73129f67 | 342 | %{_iconsdir}/hicolor/*x*/actions/libpeas-plugin.png |
f8c13b13 | 343 | %{_iconsdir}/hicolor/scalable/actions/libpeas-plugin.svg |
47dc788b AF |
344 | |
345 | %files gtk-devel | |
346 | %defattr(644,root,root,755) | |
578af9cd | 347 | %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so |
47dc788b AF |
348 | %{_pkgconfigdir}/libpeas-gtk-1.0.pc |
349 | %{_datadir}/gir-1.0/PeasGtk-1.0.gir | |
85b97cae JB |
350 | |
351 | %if %{with glade} | |
352 | %files gtk-glade | |
353 | %defattr(644,root,root,755) | |
431e0f31 | 354 | %{_datadir}/glade/catalogs/libpeas-gtk.xml |
85b97cae | 355 | %endif |
47dc788b AF |
356 | |
357 | %if %{with static_libs} | |
358 | %files gtk-static | |
359 | %defattr(644,root,root,755) | |
360 | %{_libdir}/libpeas-gtk-1.0.a | |
361 | %endif | |
362 | ||
363 | %files demo | |
364 | %defattr(644,root,root,755) | |
f8c13b13 | 365 | %attr(755,root,root) %{_bindir}/peas-demo |
691382e5 MB |
366 | %dir %{_libdir}/peas-demo |
367 | %dir %{_libdir}/peas-demo/plugins | |
368 | %dir %{_libdir}/peas-demo/plugins/helloworld | |
47dc788b | 369 | %attr(755,root,root) %{_libdir}/peas-demo/plugins/helloworld/libhelloworld.so |
691382e5 | 370 | %{_libdir}/peas-demo/plugins/helloworld/helloworld.plugin |
73129f67 | 371 | %if %{with lua} |
d0b66b0f | 372 | %dir %{_libdir}/peas-demo/plugins/luahello |
73129f67 | 373 | %{_libdir}/peas-demo/plugins/luahello/luahello.lua |
d0b66b0f | 374 | %{_libdir}/peas-demo/plugins/luahello/luahello.plugin |
73129f67 JB |
375 | %endif |
376 | %if %{with python3} | |
691382e5 | 377 | %dir %{_libdir}/peas-demo/plugins/pythonhello |
47dc788b | 378 | %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.plugin |
73129f67 | 379 | %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.py |
85b97cae | 380 | %{_libdir}/peas-demo/plugins/pythonhello/__pycache__ |
73129f67 | 381 | %endif |
691382e5 | 382 | %dir %{_libdir}/peas-demo/plugins/secondtime |
47dc788b AF |
383 | %attr(755,root,root) %{_libdir}/peas-demo/plugins/secondtime/libsecondtime.so |
384 | %{_libdir}/peas-demo/plugins/secondtime/secondtime.plugin | |
47dc788b | 385 | |
47dc788b AF |
386 | %if %{with apidocs} |
387 | %files apidocs | |
388 | %defattr(644,root,root,755) | |
578af9cd | 389 | %{_gtkdocdir}/libpeas |
47dc788b | 390 | %endif |