-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathlibdbusmenu.spec
449 lines (366 loc) · 12.6 KB
/
libdbusmenu.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
#
# Conditional build:
%bcond_without apidocs # disable gtk-doc
%bcond_without gtk2 # GTK+ 2.x version of libdbusmenu-gtk
%bcond_without gtk3 # GTK+ 3.x version of libdbusmenu-gtk
%bcond_without static_libs # static libraries
%bcond_without vala # Vala API
%bcond_with valgrind # Disable json tests requiring valgrind to run
Summary: DBus Menu Library
Summary(pl.UTF-8): Biblioteka DBus Menu
Name: libdbusmenu
Version: 16.04.0
Release: 2
License: GPL v3, LGPL v2.1, LGPL v3
Group: Libraries
Source0: https://launchpad.net/libdbusmenu/16.04/%{version}/+download/%{name}-%{version}.tar.gz
# Source0-md5: 3c05d53053b3ea69384b5f93d7a4c7c4
Patch0: python3.patch
URL: https://launchpad.net/libdbusmenu
BuildRequires: atk-devel
BuildRequires: autoconf >= 2.62
BuildRequires: automake
BuildRequires: gettext-tools
BuildRequires: glib2-devel >= 1:2.36
BuildRequires: gobject-introspection-devel >= 0.10
%{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.16}
%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0}
BuildRequires: gtk-doc >= 1.14
BuildRequires: intltool >= 0.35.0
BuildRequires: json-glib-devel >= 0.13.4
BuildRequires: libtool
BuildRequires: libxslt-progs
BuildRequires: pkgconfig
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.527
%{?with_vala:BuildRequires: vala}
%{?with_valgrind:BuildRequires: valgrind}
BuildRequires: xorg-lib-libX11-devel >= 1.3
Requires: glib2 >= 1:2.36
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
A small little library that was created by pulling out some common
code out of indicator-applet.
It passes a menu structure across DBus so that a program can create a
menu simply without worrying about how it is displayed on the other
side of the bus.
%description -l pl.UTF-8
Mała biblioteka utworzona poprzez wydobycie części wspólnego kodu z
pakietu indicator-applet.
Przekazuje strukturę menu poprzez DBus, dzięki czemu program może w
prosty sposób utworzyć menu, bez wnikania w sposób jego wyświetlania
po drugiej stronie szyny.
%package devel
Summary: Development files for libdbusmenu-glib library
Summary(pl.UTF-8): Pliki programistyczne biblioteki libdbusmenu-glib
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel >= 1:2.36
%description devel
Header and other development files for libdbusmenu-glib library.
%description devel -l pl.UTF-8
Pliki nagłówkowe oraz inne programistyczne dla biblioteki
libdbusmenu-glib.
%package static
Summary: Static libdbusmenu-glib library
Summary(pl.UTF-8): Statyczna biblioteka libdbusmenu-glib
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
Static libdbusmenu-glib library.
%description static -l pl.UTF-8
Statyczna biblioteka libdbusmenu-glib.
%package -n vala-libdbusmenu
Summary: Vala API for libdbusmenu-glib library
Summary(pl.UTF-8): API języka Vala do biblioteki libdbusmenu-glib
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: vala
BuildArch: noarch
%description -n vala-libdbusmenu
Vala API for libdbusmenu-glib library.
%description -n vala-libdbusmenu -l pl.UTF-8
API języka Vala do biblioteki libdbusmenu-glib.
%package apidocs
Summary: API documentation for libdbusmenu-glib library
Summary(pl.UTF-8): Dokumentacja API biblioteki libdbusmenu-glib
Group: Documentation
BuildArch: noarch
%description apidocs
API documentation for libdbusmenu-glib library.
%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki libdbusmenu-glib.
%package jsonloader
Summary: Library to load JSON descriptions of menus
Summary(pl.UTF-8): Biblioteka do wczytywania opisów menu w formacie JSON
Group: Libraries
Requires: %{name} = %{version}-%{release}
Requires: json-glib >= 0.13.4
%description jsonloader
A small library to load JSON descriptions of menus. Mostly for
testing.
%description jsonloader -l pl.UTF-8
Mała biblioteka do wczytywania opisów menu w formacie JSON. Głównie do
celów testowych.
%package jsonloader-devel
Summary: Header files for libdbusmenu-jsonloader
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdbusmenu-jsonloader
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-jsonloader = %{version}-%{release}
Requires: json-glib-devel >= 0.13.4
%description jsonloader-devel
Header files for libdbusmenu-jsonloader.
%description jsonloader-devel -l pl.UTF-8
Pliki nagłówkowe biblioteki libdbusmenu-jsonloader.
%package jsonloader-static
Summary: Static libdbusmenu-jsonloader library
Summary(pl.UTF-8): Statyczna biblioteka libdbusmenu-jsonloader
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description jsonloader-static
Static libdbusmenu-jsonloader library.
%description jsonloader-static -l pl.UTF-8
Statyczna biblioteka libdbusmenu-jsonloader.
%package gtk2
Summary: libdbusmenu-gtk (GTK+ 2.x based) library
Summary(pl.UTF-8): Biblioteka libdbusmenu-gtk (oparta na GTK+ 2.x)
Group: Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk+2 >= 2:2.16
%description gtk2
libdbusmenu-gtk (GTK+ 2.x based) library.
%description gtk2 -l pl.UTF-8
Biblioteka libdbusmenu-gtk (oparta na GTK+ 2.x).
%package gtk2-devel
Summary: Header files for libdbusmenu-gtk library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdbusmenu-gtk
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-gtk2 = %{version}-%{release}
Requires: gdk-pixbuf2-devel >= 2.0
Requires: gtk+2-devel >= 2:2.16
%description gtk2-devel
Header files for libdbusmenu-gtk library.
%description gtk2-devel -l pl.UTF-8
Pliki nagłówkowe biblioteki libdbusmenu-gtk.
%package gtk2-static
Summary: Static libdbusmenu-gtk library
Summary(pl.UTF-8): Statyczna biblioteka libdbusmenu-gtk
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description gtk2-static
Static libdbusmenu-gtk library.
%description gtk2-static -l pl.UTF-8
Statyczna biblioteka libdbusmenu-gtk.
%package -n vala-libdbusmenu-gtk2
Summary: Vala API for libdbusmenu-gtk (GTK+ 2.x based) library
Summary(pl.UTF-8): API języka Vala do biblioteki libdbusmenu-gtk (opartej na GTK+ 2.x)
Group: Development/Libraries
Requires: %{name}-gtk2-devel = %{version}-%{release}
Requires: vala-libdbusmenu = %{version}-%{release}
%description -n vala-libdbusmenu-gtk2
Vala API for libdbusmenu-gtk (GTK+ 2.x based) library.
%description -n vala-libdbusmenu-gtk2 -l pl.UTF-8
API języka Vala do biblioteki libdbusmenu-gtk (opartej na GTK+ 2.x).
%package gtk3
Summary: libdbusmenu-gtk3 library
Summary(pl.UTF-8): Biblioteka libdbusmenu-gtk3
Group: Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk+3 >= 3.0
%description gtk3
libdbusmenu-gtk3 library.
%description gtk3 -l pl.UTF-8
Biblioteka libdbusmenu-gtk3.
%package gtk3-devel
Summary: Header files for libdbusmenu-gtk3 library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdbusmenu-gtk3
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-gtk3 = %{version}-%{release}
Requires: gdk-pixbuf2-devel >= 2.0
Requires: gtk+3-devel >= 3.0
%description gtk3-devel
Header files for libdbusmenu-gtk3 library.
%description gtk3-devel -l pl.UTF-8
Pliki nagłówkowe biblioteki libdbusmenu-gtk3.
%package gtk3-static
Summary: Static libdbusmenu-gtk3 library
Summary(pl.UTF-8): Statyczna biblioteka libdbusmenu-gtk3
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description gtk3-static
Static libdbusmenu-gtk3 library.
%description gtk3-static -l pl.UTF-8
Statyczna biblioteka libdbusmenu-gtk3.
%package -n vala-libdbusmenu-gtk3
Summary: Vala API for libdbusmenu-gtk3 library
Summary(pl.UTF-8): API języka Vala do biblioteki libdbusmenu-gtk3
Group: Development/Libraries
Requires: %{name}-gtk3-devel = %{version}-%{release}
Requires: vala-libdbusmenu = %{version}-%{release}
%description -n vala-libdbusmenu-gtk3
Vala API for libdbusmenu-gtk3 library.
%description -n vala-libdbusmenu-gtk3 -l pl.UTF-8
API języka Vala do biblioteki libdbusmenu-gtk3.
%package gtk-apidocs
Summary: API documentation for libdbusmenu-gtk library
Summary(pl.UTF-8): Dokumentacja API biblioteki libdbusmenu-gtk
Group: Documentation
%description gtk-apidocs
API documentation for libdbusmenu-gtk library (both GTK+ 2.x and 3.x
based).
%description gtk-apidocs -l pl.UTF-8
Dokumentacja API biblioteki libdbusmenu-gtk (zarówno w wersji dla GTK+
2.x, jak i 3.x).
%prep
%setup -q
%patch0 -p1
%{__sed} -i -e 's/-Werror//' \
libdbusmenu-glib/Makefile.am \
libdbusmenu-gtk/Makefile.am \
tools/Makefile.am \
tools/testapp/Makefile.am
%build
%{__intltoolize}
%{__libtoolize}
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
for gtkver in %{?with_gtk2:2} %{?with_gtk3:3} %{!?with_gtk2:%{!?with_gtk3:none}} ; do
install -d build-gtk${gtkver}
cd build-gtk${gtkver}
../%configure \
%{!?with_gtk2:%{!?with_gtk3:--disable-gtk}} \
%{__enable_disable apidocs gtk-doc} \
--disable-silent-rules \
%{!?with_static_libs:--disable-static} \
%{!?with_vala:--disable-vala} \
--enable-introspection \
--with-gtk=${gtkver} \
--with-html-dir=%{_gtkdocdir}
%{__make}
cd ..
done
%install
rm -rf $RPM_BUILD_ROOT
for dir in build-gtk* ; do
%{__make} -C $dir install -j1 \
DESTDIR=$RPM_BUILD_ROOT
done
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post jsonloader -p /sbin/ldconfig
%postun jsonloader -p /sbin/ldconfig
%post gtk2 -p /sbin/ldconfig
%postun gtk2 -p /sbin/ldconfig
%post gtk3 -p /sbin/ldconfig
%postun gtk3 -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README
%attr(755,root,root) %{_libdir}/libdbusmenu-glib.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdbusmenu-glib.so.4
%{_libdir}/girepository-1.0/Dbusmenu-0.4.typelib
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libexecdir}/dbusmenu-bench
%attr(755,root,root) %{_libexecdir}/dbusmenu-dumper
%attr(755,root,root) %{_libexecdir}/dbusmenu-testapp
%attr(755,root,root) %{_libdir}/libdbusmenu-glib.so
%dir %{_includedir}/libdbusmenu-glib-0.4
%{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-glib
%{_datadir}/gir-1.0/Dbusmenu-0.4.gir
%{_pkgconfigdir}/dbusmenu-glib-0.4.pc
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/json
%{_datadir}/%{name}/json/test-gtk-label.json
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libdbusmenu-glib.a
%endif
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/libdbusmenu-glib
%endif
%if %{with vala}
%files -n vala-libdbusmenu
%defattr(644,root,root,755)
%{_datadir}/vala/vapi/Dbusmenu-0.4.vapi
%endif
%files jsonloader
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdbusmenu-jsonloader.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdbusmenu-jsonloader.so.4
%files jsonloader-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdbusmenu-jsonloader.so
%{_includedir}/libdbusmenu-glib-0.4/libdbusmenu-jsonloader
%{_pkgconfigdir}/dbusmenu-jsonloader-0.4.pc
%if %{with static_libs}
%files jsonloader-static
%defattr(644,root,root,755)
%{_libdir}/libdbusmenu-jsonloader.a
%endif
%if %{with gtk2}
%files gtk2
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdbusmenu-gtk.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdbusmenu-gtk.so.4
%{_libdir}/girepository-1.0/DbusmenuGtk-0.4.typelib
%files gtk2-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdbusmenu-gtk.so
%{_includedir}/libdbusmenu-gtk-0.4
%{_datadir}/gir-1.0/DbusmenuGtk-0.4.gir
%{_pkgconfigdir}/dbusmenu-gtk-0.4.pc
%if %{with static_libs}
%files gtk2-static
%defattr(644,root,root,755)
%{_libdir}/libdbusmenu-gtk.a
%endif
%if %{with vala}
%files -n vala-libdbusmenu-gtk2
%defattr(644,root,root,755)
%{_datadir}/vala/vapi/DbusmenuGtk-0.4.vapi
%endif
%endif
%if %{with gtk3}
%files gtk3
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdbusmenu-gtk3.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libdbusmenu-gtk3.so.4
%{_libdir}/girepository-1.0/DbusmenuGtk3-0.4.typelib
%files gtk3-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdbusmenu-gtk3.so
%{_includedir}/libdbusmenu-gtk3-0.4
%{_datadir}/gir-1.0/DbusmenuGtk3-0.4.gir
%{_pkgconfigdir}/dbusmenu-gtk3-0.4.pc
%if %{with static_libs}
%files gtk3-static
%defattr(644,root,root,755)
%{_libdir}/libdbusmenu-gtk3.a
%endif
%if %{with vala}
%files -n vala-libdbusmenu-gtk3
%defattr(644,root,root,755)
%{_datadir}/vala/vapi/DbusmenuGtk3-0.4.vapi
%endif
%endif
%if %{with apidocs}
%if %{with gtk2} || %{with gtk3}
%files gtk-apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/libdbusmenu-gtk
%endif
%endif