]> git.pld-linux.org Git - packages/libpeas.git/blob - libpeas.spec
4c7d5071aecb8b1ac277a8f2abd5afcedc494330
[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.28.0
20 Release:        1
21 License:        LGPL v2.1+
22 Group:          Libraries
23 Source0:        https://download.gnome.org/sources/libpeas/1.28/%{name}-%{version}.tar.xz
24 # Source0-md5:  62a5d01e9561f8fafca68e2863640735
25 Patch0:         %{name}-tests-with-static.patch
26 Patch1:         %{name}-gtkdocdir.patch
27 URL:            https://wiki.gnome.org/Libpeas
28 BuildRequires:  gettext-tools >= 0.19.7
29 %{?with_glade:BuildRequires:    glade-devel >= 2.0}
30 BuildRequires:  glib2-devel >= 1:2.38.0
31 BuildRequires:  gobject-introspection-devel >= 1.40.0
32 BuildRequires:  gtk+3-devel >= 3.0.0
33 BuildRequires:  gtk-doc >= 1.11
34 %if %{with lua}
35 BuildRequires:  lua-lgi >= 0.9.0
36 %{!?with_luajit:BuildRequires:  lua51-devel >= 5.1.0}
37 %{?with_luajit:BuildRequires:   luajit-devel >= 2.0}
38 %endif
39 BuildRequires:  meson >= 0.49.0
40 BuildRequires:  ninja >= 1.5
41 %if %{with python2}
42 BuildRequires:  python-devel >= 1:2.5.2
43 BuildRequires:  python-pygobject3-devel >= 3.2.0
44 %endif
45 %if %{with python3}
46 BuildRequires:  python3-devel >= 1:3.2.0
47 BuildRequires:  python3-pygobject3-devel >= 3.2.0
48 %endif
49 BuildRequires:  rpmbuild(macros) >= 1.736
50 BuildRequires:  tar >= 1:1.22
51 BuildRequires:  vala
52 BuildRequires:  xz
53 %{!?with_luajit:BuildConflicts: luajit-devel}
54 Requires:       glib2 >= 1:2.38.0
55 Requires:       gobject-introspection >= 1.40.0
56 Obsoletes:      libpeas-loader-gjs < 1.10.0
57 Obsoletes:      libpeas-loader-seed < 1.14.0
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
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
63 has a set of features including, but not limited to:
64  - multiple extension points
65  - on demand (lazy) programming language support for C, Python and Lua
66  - simplicity of the API
67
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ń
73  - wsparcie dla leniwego programowania dla języków C, Python i Lua
74  - prostota API
75
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}
81 Requires:       lua-lgi >= 0.9.0
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
89 %package loader-python
90 Summary:        Python 2.x loader for libpeas library
91 Summary(pl.UTF-8):      Moduł ładujący dla Pythona 2.x do biblioteki libpeas
92 Group:          Libraries
93 Requires:       %{name} = %{version}-%{release}
94 Requires:       python-libs >= 1:2.5.2
95
96 %description loader-python
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.
101
102 %package loader-python3
103 Summary:        Python 3.x loader for libpeas library
104 Summary(pl.UTF-8):      Moduł ładujący dla Pythona 3.x do biblioteki libpeas
105 Group:          Libraries
106 Requires:       %{name} = %{version}-%{release}
107
108 %description loader-python3
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.
113
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}
119 Requires:       glib2-devel >= 1:2.38.0
120 Requires:       gobject-introspection-devel >= 1.40.0
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
141 Summary:        GObject Plugin System - GTK+ widgets
142 Summary(pl.UTF-8):      System wtyczek GObject - widgety GTK+
143 Group:          X11/Libraries
144 Requires(post,postun):  gtk-update-icon-cache
145 Requires:       %{name} = %{version}-%{release}
146 Requires:       gtk+3 >= 3.0.0
147 Requires:       hicolor-icon-theme
148
149 %description gtk
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
152 has a set of features including, but not limited to:
153  - multiple extension points
154  - on demand (lazy) programming language support for C, Python and Lua
155  - simplicity of the API
156
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ń
164  - wsparcie dla leniwego programowania dla języków C, Python i Lua
165  - prostota API
166
167 Ten pakiet zawiera bibliotekę widgetów GTK+.
168
169 %package gtk-devel
170 Summary:        Header files for libpeas-gtk library
171 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libpeas-gtk
172 Group:          X11/Development/Libraries
173 Requires:       %{name}-devel = %{version}-%{release}
174 Requires:       %{name}-gtk = %{version}-%{release}
175 Requires:       gtk+3-devel >= 3.0.0
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
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
196 %package gtk-static
197 Summary:        Static libpeas-gtk library
198 Summary(pl.UTF-8):      Statyczna biblioteka libpeas-gtk
199 Group:          X11/Development/Libraries
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
213 Requires:       gtk-doc-common
214 BuildArch:      noarch
215
216 %description apidocs
217 API and internal documentation for libpeas library.
218
219 %description apidocs -l pl.UTF-8
220 Dokumentacja API biblioteki libpeas.
221
222 %package demo
223 Summary:        Demo application for libpeas
224 Summary(pl.UTF-8):      Aplikacja demonstracyjna libpeas
225 Group:          Applications
226 Requires:       %{name} = %{version}-%{release}
227 Requires:       %{name}-gtk = %{version}-%{release}
228 %if %{with lua}
229 Requires:       %{name}-loader-lua = %{version}-%{release}
230 %endif
231 %if %{with python3}
232 Requires:       %{name}-loader-python3 = %{version}-%{release}
233 %endif
234
235 %description demo
236 Demo application for libpeas.
237
238 %description demo -l pl.UTF-8
239 Aplikacja demonstracyjna libpeas.
240
241 %prep
242 %setup -q
243 %if %{with static_libs}
244 %patch0 -p1
245 %endif
246 %patch1 -p1
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 %find_lang libpeas-1.0
280
281 %clean
282 rm -rf $RPM_BUILD_ROOT
283
284 %post   -p /sbin/ldconfig
285 %postun -p /sbin/ldconfig
286
287 %post gtk
288 /sbin/ldconfig
289 %update_icon_cache hicolor
290
291 %postun gtk
292 /sbin/ldconfig
293 %update_icon_cache hicolor
294
295 %files -f libpeas-1.0.lang
296 %defattr(644,root,root,755)
297 %doc AUTHORS NEWS README
298 %attr(755,root,root) %{_libdir}/libpeas-1.0.so.*.*.*
299 %attr(755,root,root) %ghost %{_libdir}/libpeas-1.0.so.0
300 %dir %{_libdir}/libpeas-1.0
301 %dir %{_libdir}/libpeas-1.0/loaders
302 %{_libdir}/girepository-1.0/Peas-1.0.typelib
303
304 %if %{with lua}
305 %files loader-lua
306 %defattr(644,root,root,755)
307 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/liblua51loader.so
308 %endif
309
310 %if %{with python2}
311 %files loader-python
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpythonloader.so
314 %endif
315
316 %if %{with python3}
317 %files loader-python3
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpython3loader.so
320 %endif
321
322 %files devel
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_libdir}/libpeas-1.0.so
325 %{_includedir}/libpeas-1.0
326 %{_pkgconfigdir}/libpeas-1.0.pc
327 %{_datadir}/gir-1.0/Peas-1.0.gir
328
329 %if %{with static_libs}
330 %files static
331 %defattr(644,root,root,755)
332 %{_libdir}/libpeas-1.0.a
333 %endif
334
335 %files gtk
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so.*.*.*
338 %attr(755,root,root) %ghost %{_libdir}/libpeas-gtk-1.0.so.0
339 %{_libdir}/girepository-1.0/PeasGtk-1.0.typelib
340 %{_iconsdir}/hicolor/*x*/actions/libpeas-plugin.png
341 %{_iconsdir}/hicolor/scalable/actions/libpeas-plugin.svg
342
343 %files gtk-devel
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so
346 %{_pkgconfigdir}/libpeas-gtk-1.0.pc
347 %{_datadir}/gir-1.0/PeasGtk-1.0.gir
348
349 %if %{with glade}
350 %files gtk-glade
351 %defattr(644,root,root,755)
352 %{_datadir}/glade/catalogs/libpeas-gtk.xml
353 %endif
354
355 %if %{with static_libs}
356 %files gtk-static
357 %defattr(644,root,root,755)
358 %{_libdir}/libpeas-gtk-1.0.a
359 %endif
360
361 %files demo
362 %defattr(644,root,root,755)
363 %attr(755,root,root) %{_bindir}/peas-demo
364 %dir %{_libdir}/peas-demo
365 %dir %{_libdir}/peas-demo/plugins
366 %dir %{_libdir}/peas-demo/plugins/helloworld
367 %attr(755,root,root) %{_libdir}/peas-demo/plugins/helloworld/libhelloworld.so
368 %{_libdir}/peas-demo/plugins/helloworld/helloworld.plugin
369 %if %{with lua}
370 %dir %{_libdir}/peas-demo/plugins/luahello
371 %{_libdir}/peas-demo/plugins/luahello/luahello.lua
372 %{_libdir}/peas-demo/plugins/luahello/luahello.plugin
373 %endif
374 %if %{with python3}
375 %dir %{_libdir}/peas-demo/plugins/pythonhello
376 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.plugin
377 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.py
378 %{_libdir}/peas-demo/plugins/pythonhello/__pycache__
379 %endif
380 %dir %{_libdir}/peas-demo/plugins/secondtime
381 %attr(755,root,root) %{_libdir}/peas-demo/plugins/secondtime/libsecondtime.so
382 %{_libdir}/peas-demo/plugins/secondtime/secondtime.plugin
383
384 %if %{with apidocs}
385 %files apidocs
386 %defattr(644,root,root,755)
387 %{_gtkdocdir}/libpeas
388 %endif
This page took 0.048551 seconds and 2 git commands to generate.