]> git.pld-linux.org Git - packages/libpeas.git/blob - libpeas.spec
up to 1.30.0
[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.30.0
20 Release:        1
21 License:        LGPL v2.1+
22 Group:          Libraries
23 Source0:        https://download.gnome.org/sources/libpeas/1.30/%{name}-%{version}.tar.xz
24 # Source0-md5:  60b9d9fe2ee9dd518fb12d5d404e296a
25 Patch0:         %{name}-gtkdocdir.patch
26 URL:            https://wiki.gnome.org/Libpeas
27 BuildRequires:  gettext-tools >= 0.19.7
28 %{?with_glade:BuildRequires:    glade-devel >= 2.0}
29 BuildRequires:  glib2-devel >= 1:2.38.0
30 BuildRequires:  gobject-introspection-devel >= 1.40.0
31 BuildRequires:  gtk+3-devel >= 3.0.0
32 BuildRequires:  gtk-doc >= 1.11
33 %if %{with lua}
34 BuildRequires:  lua-lgi >= 0.9.0
35 %{!?with_luajit:BuildRequires:  lua51-devel >= 5.1.0}
36 %{?with_luajit:BuildRequires:   luajit-devel >= 2.0}
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
42 BuildRequires:  python-pygobject3-devel >= 3.2.0
43 %endif
44 %if %{with python3}
45 BuildRequires:  python3-devel >= 1:3.2.0
46 BuildRequires:  python3-pygobject3-devel >= 3.2.0
47 %endif
48 BuildRequires:  rpmbuild(macros) >= 1.736
49 BuildRequires:  tar >= 1:1.22
50 BuildRequires:  vala
51 BuildRequires:  xz
52 %{!?with_luajit:BuildConflicts: luajit-devel}
53 Requires:       glib2 >= 1:2.38.0
54 Requires:       gobject-introspection >= 1.40.0
55 Obsoletes:      libpeas-loader-gjs < 1.10.0
56 Obsoletes:      libpeas-loader-seed < 1.14.0
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %description
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
62 has a set of features including, but not limited to:
63  - multiple extension points
64  - on demand (lazy) programming language support for C, Python and Lua
65  - simplicity of the API
66
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ń
72  - wsparcie dla leniwego programowania dla języków C, Python i Lua
73  - prostota API
74
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}
80 Requires:       lua-lgi >= 0.9.0
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
88 %package loader-python
89 Summary:        Python 2.x loader for libpeas library
90 Summary(pl.UTF-8):      Moduł ładujący dla Pythona 2.x do biblioteki libpeas
91 Group:          Libraries
92 Requires:       %{name} = %{version}-%{release}
93 Requires:       python-libs >= 1:2.5.2
94
95 %description loader-python
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.
100
101 %package loader-python3
102 Summary:        Python 3.x loader for libpeas library
103 Summary(pl.UTF-8):      Moduł ładujący dla Pythona 3.x do biblioteki libpeas
104 Group:          Libraries
105 Requires:       %{name} = %{version}-%{release}
106
107 %description loader-python3
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.
112
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}
118 Requires:       glib2-devel >= 1:2.38.0
119 Requires:       gobject-introspection-devel >= 1.40.0
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
140 Summary:        GObject Plugin System - GTK+ widgets
141 Summary(pl.UTF-8):      System wtyczek GObject - widgety GTK+
142 Group:          X11/Libraries
143 Requires(post,postun):  gtk-update-icon-cache
144 Requires:       %{name} = %{version}-%{release}
145 Requires:       gtk+3 >= 3.0.0
146 Requires:       hicolor-icon-theme
147
148 %description gtk
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
151 has a set of features including, but not limited to:
152  - multiple extension points
153  - on demand (lazy) programming language support for C, Python and Lua
154  - simplicity of the API
155
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ń
163  - wsparcie dla leniwego programowania dla języków C, Python i Lua
164  - prostota API
165
166 Ten pakiet zawiera bibliotekę widgetów GTK+.
167
168 %package gtk-devel
169 Summary:        Header files for libpeas-gtk library
170 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libpeas-gtk
171 Group:          X11/Development/Libraries
172 Requires:       %{name}-devel = %{version}-%{release}
173 Requires:       %{name}-gtk = %{version}-%{release}
174 Requires:       gtk+3-devel >= 3.0.0
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
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
195 %package gtk-static
196 Summary:        Static libpeas-gtk library
197 Summary(pl.UTF-8):      Statyczna biblioteka libpeas-gtk
198 Group:          X11/Development/Libraries
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
212 Requires:       gtk-doc-common
213 BuildArch:      noarch
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
223 Summary(pl.UTF-8):      Aplikacja demonstracyjna libpeas
224 Group:          Applications
225 Requires:       %{name} = %{version}-%{release}
226 Requires:       %{name}-gtk = %{version}-%{release}
227 %if %{with lua}
228 Requires:       %{name}-loader-lua = %{version}-%{release}
229 %endif
230 %if %{with python3}
231 Requires:       %{name}-loader-python3 = %{version}-%{release}
232 %endif
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
242 %patch0 -p1
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
253
254 %build
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
266
267 %install
268 rm -rf $RPM_BUILD_ROOT
269
270 %ninja_install -C build
271
272 %py3_comp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello
273 %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello
274
275 %find_lang libpeas-1.0
276
277 %clean
278 rm -rf $RPM_BUILD_ROOT
279
280 %post   -p /sbin/ldconfig
281 %postun -p /sbin/ldconfig
282
283 %post gtk
284 /sbin/ldconfig
285 %update_icon_cache hicolor
286
287 %postun gtk
288 /sbin/ldconfig
289 %update_icon_cache hicolor
290
291 %files -f libpeas-1.0.lang
292 %defattr(644,root,root,755)
293 %doc AUTHORS NEWS README
294 %attr(755,root,root) %{_libdir}/libpeas-1.0.so.*.*.*
295 %attr(755,root,root) %ghost %{_libdir}/libpeas-1.0.so.0
296 %dir %{_libdir}/libpeas-1.0
297 %dir %{_libdir}/libpeas-1.0/loaders
298 %{_libdir}/girepository-1.0/Peas-1.0.typelib
299
300 %if %{with lua}
301 %files loader-lua
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/liblua51loader.so
304 %endif
305
306 %if %{with python2}
307 %files loader-python
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpythonloader.so
310 %endif
311
312 %if %{with python3}
313 %files loader-python3
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpython3loader.so
316 %endif
317
318 %files devel
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_libdir}/libpeas-1.0.so
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
336 %{_iconsdir}/hicolor/*x*/actions/libpeas-plugin.png
337 %{_iconsdir}/hicolor/scalable/actions/libpeas-plugin.svg
338
339 %files gtk-devel
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so
342 %{_pkgconfigdir}/libpeas-gtk-1.0.pc
343 %{_datadir}/gir-1.0/PeasGtk-1.0.gir
344
345 %if %{with glade}
346 %files gtk-glade
347 %defattr(644,root,root,755)
348 %{_datadir}/glade/catalogs/libpeas-gtk.xml
349 %endif
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)
359 %attr(755,root,root) %{_bindir}/peas-demo
360 %dir %{_libdir}/peas-demo
361 %dir %{_libdir}/peas-demo/plugins
362 %dir %{_libdir}/peas-demo/plugins/helloworld
363 %attr(755,root,root) %{_libdir}/peas-demo/plugins/helloworld/libhelloworld.so
364 %{_libdir}/peas-demo/plugins/helloworld/helloworld.plugin
365 %if %{with lua}
366 %dir %{_libdir}/peas-demo/plugins/luahello
367 %{_libdir}/peas-demo/plugins/luahello/luahello.lua
368 %{_libdir}/peas-demo/plugins/luahello/luahello.plugin
369 %endif
370 %if %{with python3}
371 %dir %{_libdir}/peas-demo/plugins/pythonhello
372 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.plugin
373 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.py
374 %{_libdir}/peas-demo/plugins/pythonhello/__pycache__
375 %endif
376 %dir %{_libdir}/peas-demo/plugins/secondtime
377 %attr(755,root,root) %{_libdir}/peas-demo/plugins/secondtime/libsecondtime.so
378 %{_libdir}/peas-demo/plugins/secondtime/secondtime.plugin
379
380 %if %{with apidocs}
381 %files apidocs
382 %defattr(644,root,root,755)
383 %{_gtkdocdir}/libpeas
384 %endif
This page took 0.105778 seconds and 3 git commands to generate.