]> git.pld-linux.org Git - packages/libpeas.git/blob - libpeas.spec
- rebuild with python 3.8
[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.24.0
20 Release:        2
21 License:        LGPL v2.1+
22 Group:          Libraries
23 Source0:        http://ftp.gnome.org/pub/GNOME/sources/libpeas/1.24/%{name}-%{version}.tar.xz
24 # Source0-md5:  7a136eea60930012deff2f7bfa3673be
25 Patch0:         %{name}-tests-with-static.patch
26 Patch1:         %{name}-gtkdocdir.patch
27 URL:            https://wiki.gnome.org/Libpeas
28 BuildRequires:  gettext-tools >= 0.17
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 BuildRequires:  intltool >= 0.40.0
35 %if %{with lua}
36 BuildRequires:  lua-lgi >= 0.9.0
37 %{!?with_luajit:BuildRequires:  lua51-devel >= 5.1.0}
38 %{?with_luajit:BuildRequires:   luajit-devel >= 2.0}
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
44 BuildRequires:  python-pygobject3-devel >= 3.2.0
45 %endif
46 %if %{with python3}
47 BuildRequires:  python3-devel >= 1:3.2.0
48 BuildRequires:  python3-pygobject3-devel >= 3.2.0
49 %endif
50 BuildRequires:  rpmbuild(macros) >= 1.601
51 BuildRequires:  tar >= 1:1.22
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
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 %if "%{_rpmversion}" >= "5"
215 BuildArch:      noarch
216 %endif
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
226 Summary(pl.UTF-8):      Aplikacja demonstracyjna libpeas
227 Group:          Applications
228 Requires:       %{name} = %{version}-%{release}
229 Requires:       %{name}-gtk = %{version}-%{release}
230 %if %{with lua}
231 Requires:       %{name}-loader-lua = %{version}-%{release}
232 %endif
233 %if %{with python3}
234 Requires:       %{name}-loader-python3 = %{version}-%{release}
235 %endif
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
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
259
260 %build
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
272
273 %install
274 rm -rf $RPM_BUILD_ROOT
275
276 %ninja_install -C build
277
278 %py3_comp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello
279 %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello
280
281 %find_lang libpeas-1.0
282
283 %clean
284 rm -rf $RPM_BUILD_ROOT
285
286 %post   -p /sbin/ldconfig
287 %postun -p /sbin/ldconfig
288
289 %post gtk
290 /sbin/ldconfig
291 %update_icon_cache hicolor
292
293 %postun gtk
294 /sbin/ldconfig
295 %update_icon_cache hicolor
296
297 %files -f libpeas-1.0.lang
298 %defattr(644,root,root,755)
299 %doc AUTHORS NEWS README
300 %attr(755,root,root) %{_libdir}/libpeas-1.0.so.*.*.*
301 %attr(755,root,root) %ghost %{_libdir}/libpeas-1.0.so.0
302 %dir %{_libdir}/libpeas-1.0
303 %dir %{_libdir}/libpeas-1.0/loaders
304 %{_libdir}/girepository-1.0/Peas-1.0.typelib
305
306 %if %{with lua}
307 %files loader-lua
308 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/liblua51loader.so
310 %endif
311
312 %if %{with python2}
313 %files loader-python
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpython2loader.so
316 %endif
317
318 %if %{with python3}
319 %files loader-python3
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpython3loader.so
322 %endif
323
324 %files devel
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{_libdir}/libpeas-1.0.so
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
342 %{_iconsdir}/hicolor/*x*/actions/libpeas-plugin.png
343 %{_iconsdir}/hicolor/scalable/actions/libpeas-plugin.svg
344
345 %files gtk-devel
346 %defattr(644,root,root,755)
347 %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so
348 %{_pkgconfigdir}/libpeas-gtk-1.0.pc
349 %{_datadir}/gir-1.0/PeasGtk-1.0.gir
350
351 %if %{with glade}
352 %files gtk-glade
353 %defattr(644,root,root,755)
354 %{_datadir}/glade/catalogs/libpeas-gtk.xml
355 %endif
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)
365 %attr(755,root,root) %{_bindir}/peas-demo
366 %dir %{_libdir}/peas-demo
367 %dir %{_libdir}/peas-demo/plugins
368 %dir %{_libdir}/peas-demo/plugins/helloworld
369 %attr(755,root,root) %{_libdir}/peas-demo/plugins/helloworld/libhelloworld.so
370 %{_libdir}/peas-demo/plugins/helloworld/helloworld.plugin
371 %if %{with lua}
372 %dir %{_libdir}/peas-demo/plugins/luahello
373 %{_libdir}/peas-demo/plugins/luahello/luahello.lua
374 %{_libdir}/peas-demo/plugins/luahello/luahello.plugin
375 %endif
376 %if %{with python3}
377 %dir %{_libdir}/peas-demo/plugins/pythonhello
378 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.plugin
379 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.py
380 %{_libdir}/peas-demo/plugins/pythonhello/__pycache__
381 %endif
382 %dir %{_libdir}/peas-demo/plugins/secondtime
383 %attr(755,root,root) %{_libdir}/peas-demo/plugins/secondtime/libsecondtime.so
384 %{_libdir}/peas-demo/plugins/secondtime/secondtime.plugin
385
386 %if %{with apidocs}
387 %files apidocs
388 %defattr(644,root,root,755)
389 %{_gtkdocdir}/libpeas
390 %endif
This page took 0.119672 seconds and 3 git commands to generate.