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