]> git.pld-linux.org Git - packages/libpeas.git/blob - libpeas.spec
6512219b2805bb7e3dc53967bea1a50917929165
[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:        2
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.50.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:  rpm-build >= 4.6
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 %patch0 -p1
244
245 %if %{with lua}
246 # meson buildsystem expects .pc file for lua-lgi detection
247 install -d fake-pkgconfig
248 cat >fake-pkgconfig/lua5.1-lgi.pc <<'EOF'
249 Name: lua-lgi
250 Description: Lua LGI
251 Version: %(rpm -q --qf '%%{V}\n' lua-lgi)
252 EOF
253 %endif
254
255 %build
256 export PKG_CONFIG_PATH=$(pwd)/fake-pkgconfig
257 %meson build \
258         %{!?with_static_libs:--default-library=shared} \
259         %{!?with_glade:-Dglade_catalog=false} \
260         %{?with_apidocs:-Dgtk_doc=true} \
261         %{!?with_lua:-Dlua51=false} \
262         %{?with_python2:-Dpython2=true} \
263         %{!?with_python3:-Dpython3=false} \
264         -Dvapi=true
265
266 %ninja_build -C build
267
268 %install
269 rm -rf $RPM_BUILD_ROOT
270
271 %ninja_install -C build
272
273 %py3_comp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello
274 %py3_ocomp $RPM_BUILD_ROOT%{_libdir}/peas-demo/plugins/pythonhello
275
276 %find_lang libpeas-1.0
277
278 %clean
279 rm -rf $RPM_BUILD_ROOT
280
281 %post   -p /sbin/ldconfig
282 %postun -p /sbin/ldconfig
283
284 %post gtk
285 /sbin/ldconfig
286 %update_icon_cache hicolor
287
288 %postun gtk
289 /sbin/ldconfig
290 %update_icon_cache hicolor
291
292 %files -f libpeas-1.0.lang
293 %defattr(644,root,root,755)
294 %doc AUTHORS NEWS README
295 %attr(755,root,root) %{_libdir}/libpeas-1.0.so.*.*.*
296 %attr(755,root,root) %ghost %{_libdir}/libpeas-1.0.so.0
297 %dir %{_libdir}/libpeas-1.0
298 %dir %{_libdir}/libpeas-1.0/loaders
299 %{_libdir}/girepository-1.0/Peas-1.0.typelib
300
301 %if %{with lua}
302 %files loader-lua
303 %defattr(644,root,root,755)
304 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/liblua51loader.so
305 %endif
306
307 %if %{with python2}
308 %files loader-python
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpythonloader.so
311 %endif
312
313 %if %{with python3}
314 %files loader-python3
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_libdir}/libpeas-1.0/loaders/libpython3loader.so
317 %endif
318
319 %files devel
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/libpeas-1.0.so
322 %{_includedir}/libpeas-1.0
323 %{_pkgconfigdir}/libpeas-1.0.pc
324 %{_datadir}/gir-1.0/Peas-1.0.gir
325
326 %if %{with static_libs}
327 %files static
328 %defattr(644,root,root,755)
329 %{_libdir}/libpeas-1.0.a
330 %endif
331
332 %files gtk
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so.*.*.*
335 %attr(755,root,root) %ghost %{_libdir}/libpeas-gtk-1.0.so.0
336 %{_libdir}/girepository-1.0/PeasGtk-1.0.typelib
337 %{_iconsdir}/hicolor/*x*/actions/libpeas-plugin.png
338 %{_iconsdir}/hicolor/scalable/actions/libpeas-plugin.svg
339
340 %files gtk-devel
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_libdir}/libpeas-gtk-1.0.so
343 %{_pkgconfigdir}/libpeas-gtk-1.0.pc
344 %{_datadir}/gir-1.0/PeasGtk-1.0.gir
345
346 %if %{with glade}
347 %files gtk-glade
348 %defattr(644,root,root,755)
349 %{_datadir}/glade/catalogs/libpeas-gtk.xml
350 %endif
351
352 %if %{with static_libs}
353 %files gtk-static
354 %defattr(644,root,root,755)
355 %{_libdir}/libpeas-gtk-1.0.a
356 %endif
357
358 %files demo
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_bindir}/peas-demo
361 %dir %{_libdir}/peas-demo
362 %dir %{_libdir}/peas-demo/plugins
363 %dir %{_libdir}/peas-demo/plugins/helloworld
364 %attr(755,root,root) %{_libdir}/peas-demo/plugins/helloworld/libhelloworld.so
365 %{_libdir}/peas-demo/plugins/helloworld/helloworld.plugin
366 %if %{with lua}
367 %dir %{_libdir}/peas-demo/plugins/luahello
368 %{_libdir}/peas-demo/plugins/luahello/luahello.lua
369 %{_libdir}/peas-demo/plugins/luahello/luahello.plugin
370 %endif
371 %if %{with python3}
372 %dir %{_libdir}/peas-demo/plugins/pythonhello
373 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.plugin
374 %{_libdir}/peas-demo/plugins/pythonhello/pythonhello.py
375 %{_libdir}/peas-demo/plugins/pythonhello/__pycache__
376 %endif
377 %dir %{_libdir}/peas-demo/plugins/secondtime
378 %attr(755,root,root) %{_libdir}/peas-demo/plugins/secondtime/libsecondtime.so
379 %{_libdir}/peas-demo/plugins/secondtime/secondtime.plugin
380
381 %if %{with apidocs}
382 %files apidocs
383 %defattr(644,root,root,755)
384 %{_gtkdocdir}/libpeas
385 %endif
This page took 0.044745 seconds and 2 git commands to generate.