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