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