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