]>
Commit | Line | Data |
---|---|---|
547d32e1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without gtk2 # GTK+ 2.x version | |
4 | %bcond_without gtk3 # GTK+ 3.x version | |
5 | %bcond_without static_libs # static libraries | |
6 | %bcond_without mono # Mono bindings | |
7 | %bcond_without vala # Vala APIs | |
8 | # | |
9 | Summary: Application indicators library | |
10 | Summary(pl.UTF-8): Biblioteka wskaźników aplikacji | |
11 | Name: libappindicator | |
12 | Version: 12.10.0 | |
13 | Release: 1 | |
14 | License: LGPL v2.1 or LGPL v3 | |
15 | Group: Libraries | |
16 | #Source0Download: https://launchpad.net/libappindicator/+download | |
17 | Source0: http://launchpad.net/libappindicator/12.10/%{version}/+download/%{name}-%{version}.tar.gz | |
18 | # Source0-md5: 41910f2005edee9240da1e53fffcdc12 | |
19 | Patch0: %{name}-python.patch | |
20 | Patch1: %{name}-mono.patch | |
21 | URL: https://launchpad.net/libappindicator | |
22 | BuildRequires: autoconf >= 2.64 | |
23 | BuildRequires: automake >= 1:1.11 | |
24 | BuildRequires: dbus-glib-devel >= 0.82 | |
25 | %{?with_mono:BuildRequires: dotnet-gtk-sharp2-devel >= 2.12.1} | |
26 | BuildRequires: glib2-devel >= 1:2.26 | |
27 | BuildRequires: gobject-introspection-devel >= 0.10 | |
28 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.18} | |
29 | %{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0} | |
30 | BuildRequires: gtk-doc >= 1.9 | |
31 | %{?with_gtk2:BuildRequires: libdbusmenu-gtk2-devel >= 0.5.90} | |
32 | %{?with_gtk3:BuildRequires: libdbusmenu-gtk3-devel >= 0.5.90} | |
33 | %{?with_gtk2:BuildRequires: libindicator-devel >= 0.4.93} | |
34 | %{?with_gtk3:BuildRequires: libindicator-gtk3-devel >= 0.4.93} | |
35 | BuildRequires: libtool >= 2:2.2 | |
36 | %{?with_mono:BuildRequires: mono-csharp >= 1.0} | |
e1b923e8 JB |
37 | # for mono-nunit >= 2.4.7 |
38 | %{?with_mono:BuildRequires: mono-devel >= 2.4.7} | |
547d32e1 JB |
39 | BuildRequires: pkgconfig |
40 | BuildRequires: python-devel >= 2.3.5 | |
41 | BuildRequires: python-pygobject-devel >= 0.22 | |
42 | BuildRequires: python-pygtk-devel >= 2:2.14.0 | |
43 | %{?with_vala:BuildRequires: vala >= 2:0.14.0} | |
44 | BuildRequires: which | |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
46 | ||
47 | %description | |
48 | A library to allow applications to export a menu into the Unity Menu | |
49 | bar. Based on KSNI it also works in KDE and will fallback to generic | |
50 | Systray support if none of those are available. | |
51 | ||
52 | %description -l pl.UTF-8 | |
53 | Biblioteka pozwalająca aplikacjom eksportować menu do paska menu | |
54 | Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku | |
55 | obu - potrafi korzystać ze zwykłej szufladki systemowej. | |
56 | ||
57 | %package gtk2 | |
58 | Summary: Application indicators library (GTK+ 2.x version) | |
59 | Summary(pl.UTF-8): Biblioteka wskaźników aplikacji (wersja dla GTK+ 2.x) | |
60 | Group: Libraries | |
61 | Requires: glib2 >= 1:2.26 | |
62 | Requires: gtk+2 >= 2:2.18 | |
63 | Requires: libdbusmenu-gtk2 >= 0.5.90 | |
64 | Requires: libindicator >= 0.4.93 | |
65 | ||
66 | %description gtk2 | |
67 | A library to allow applications to export a menu into the Unity Menu | |
68 | bar. Based on KSNI it also works in KDE and will fallback to generic | |
69 | Systray support if none of those are available. | |
70 | ||
71 | This package contains GTK+ 2.x based version of libappindicator. | |
72 | ||
73 | %description gtk2 -l pl.UTF-8 | |
74 | Biblioteka pozwalająca aplikacjom eksportować menu do paska menu | |
75 | Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku | |
76 | obu - potrafi korzystać ze zwykłej szufladki systemowej. | |
77 | ||
78 | Ten pakiet zawiera bibliotekę libappindicator opartą na GTK+ 2.x. | |
79 | ||
80 | %package gtk2-devel | |
81 | Summary: Development files for libappindicator (GTK+ 2.x version) | |
82 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libappindicator (wersja dla GTK+ 2.x) | |
83 | Group: Development/Libraries | |
ef6ee48e | 84 | Requires: %{name}-gtk2 = %{version}-%{release} |
547d32e1 JB |
85 | Requires: glib2-devel >= 1:2.26 |
86 | Requires: gtk+2-devel >= 2:2.18 | |
87 | Requires: libdbusmenu-devel >= 0.5.90 | |
88 | ||
89 | %description gtk2-devel | |
90 | This package contains the header files for developing applications | |
91 | that use libappindicator (GTK+ 2.x version). | |
92 | ||
93 | %description gtk2-devel -l pl.UTF-8 | |
94 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
95 | wykorzystujących bibliotekę libappindicator (w wersji dla GTK+ 2.x). | |
96 | ||
97 | %package gtk2-static | |
98 | Summary: Static libappindicator library (GTK+ 2.x version) | |
99 | Summary(pl.UTF-8): Statyczna biblioteka libappindicator (wersja dla GTK+ 2.x) | |
100 | Group: Development/Libraries | |
101 | Requires: %{name}-gtk2-devel = %{version}-%{release} | |
102 | ||
103 | %description gtk2-static | |
104 | Static libappindicator library (GTK+ 2.x version). | |
105 | ||
106 | %description gtk2-static -l pl.UTF-8 | |
107 | Statyczna biblioteka libappindicator (wersja dla GTK+ 2.x). | |
108 | ||
109 | %package -n dotnet-appindicator-sharp-gtk2 | |
110 | Summary: Application indicators library for .NET (GTK+ 2.x version) | |
111 | Summary(pl.UTF-8): Biblioteka wskaźników aplikacji dla .NET (wersja GTK+ 2.x) | |
112 | Group: Libraries | |
113 | Requires: %{name}-gtk2 = %{version}-%{release} | |
114 | Requires: dotnet-gtk-sharp2 >= 2.12.1 | |
115 | ||
116 | %description -n dotnet-appindicator-sharp-gtk2 | |
117 | Mono/.NET binding for libappindicator library (GTK+ 2.x version). | |
118 | ||
119 | %description -n dotnet-appindicator-sharp-gtk2 -l pl.UTF-8 | |
120 | Wiązania Mono/.NET do biblioteki libappindicator (wersja GTK+ 2.x). | |
121 | ||
122 | %package -n dotnet-appindicator-sharp-gtk2-devel | |
123 | Summary: Development files for appindicator .NET binding (GTK+ 2.x version) | |
124 | Summary(pl.UTF-8): Pliki programistyczne wiązania .NET do biblioteki appindicator (wersja GTK+ 2.x) | |
125 | Group: Development/Libraries | |
126 | Requires: dotnet-appindicator-sharp-gtk2 = %{version}-%{release} | |
127 | Requires: dotnet-gtk-sharp2-devel >= 2.12.1 | |
128 | ||
129 | %description -n dotnet-appindicator-sharp-gtk2-devel | |
130 | Development files for appindicator .NET binding (GTK+ 2.x version). | |
131 | ||
132 | %description -n dotnet-appindicator-sharp-gtk2-devel -l pl.UTF-8 | |
133 | Pliki programistyczne wiązania .NET do biblioteki appindicator (wersja | |
134 | GTK+ 2.x). | |
135 | ||
136 | %package -n python-appindicator-gtk2 | |
137 | Summary: Python binding for appindicator library (GTK+ 2.x version) | |
138 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki appindicator (wersja GTK+ 2.x) | |
139 | Group: Libraries/Python | |
140 | Requires: %{name}-gtk2 = %{version}-%{release} | |
141 | Requires: python-pygobject >= 0.22 | |
142 | ||
143 | %description -n python-appindicator-gtk2 | |
144 | Python binding for appindicator library (GTK+ 2.x version). | |
145 | ||
146 | %description -n python-appindicator-gtk2 -l pl.UTF-8 | |
147 | Wiązanie Pythona do biblioteki appindicator (wersja GTK+ 2.x). | |
148 | ||
149 | %package -n python-appindicator-gtk2-devel | |
150 | Summary: Development files for Python appindicator binding (GTK+ 2.x version) | |
151 | Summary(pl.UTF-8): Pliki programistyczne wiązania Pythona do biblioteki appindicator (wersja GTK+ 2.x) | |
152 | Group: Development/Libraries | |
153 | Requires: python-appindicator-gtk2 = %{version}-%{release} | |
154 | Requires: python-pygobject-devel >= 0.22 | |
155 | ||
156 | %description -n python-appindicator-gtk2-devel | |
157 | Development files for Python appindicator binding (GTK+ 2.x version). | |
158 | ||
159 | %description -n python-appindicator-gtk2-devel -l pl.UTF-8 | |
160 | Pliki programistyczne wiązania Pythona do biblioteki appindicator | |
161 | (wersja GTK+ 2.x). | |
162 | ||
163 | %package -n vala-libappindicator-gtk2 | |
164 | Summary: Vala API for libappindicator library (GTK+ 2.x version) | |
165 | Summary(pl.UTF-8): API języka Vala do biblioteki libappindicator (wersja GTK+ 2.x) | |
166 | Group: Development/Libraries | |
167 | Requires: %{name}-gtk2-devel = %{version}-%{release} | |
168 | Requires: vala >= 2:0.14.0 | |
169 | ||
170 | %description -n vala-libappindicator-gtk2 | |
171 | Vala API for libappindicator library (GTK+ 2.x version). | |
172 | ||
173 | %description -n vala-libappindicator-gtk2 -l pl.UTF-8 | |
174 | API języka Vala do biblioteki libappindicator (wersja GTK+ 2.x). | |
175 | ||
176 | %package gtk3 | |
177 | Summary: Application indicators library (GTK+ 3.x version) | |
178 | Summary(pl.UTF-8): Biblioteka wskaźników aplikacji (wersja dla GTK+ 3.x) | |
179 | Group: Libraries | |
180 | Requires: glib2 >= 1:2.26 | |
181 | Requires: gtk+3 >= 3.0 | |
182 | Requires: libdbusmenu-gtk3 >= 0.5.90 | |
183 | Requires: libindicator-gtk3 >= 0.4.93 | |
184 | ||
185 | %description gtk3 | |
186 | A library to allow applications to export a menu into the Unity Menu | |
187 | bar. Based on KSNI it also works in KDE and will fallback to generic | |
188 | Systray support if none of those are available. | |
189 | ||
190 | This package contains GTK+ 3.x based version of libappindicator. | |
191 | ||
192 | %description gtk3 -l pl.UTF-8 | |
193 | Biblioteka pozwalająca aplikacjom eksportować menu do paska menu | |
194 | Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku | |
195 | obu - potrafi korzystać ze zwykłej szufladki systemowej. | |
196 | ||
197 | Ten pakiet zawiera bibliotekę libappindicator opartą na GTK+ 3.x. | |
198 | ||
199 | %package gtk3-devel | |
200 | Summary: Development files for libappindicator (GTK+ 3.x version) | |
201 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libappindicator (wersja dla GTK+ 3.x) | |
202 | Group: Development/Libraries | |
203 | Requires: %{name}-gtk3 = %{version}-%{release} | |
204 | Requires: glib2-devel >= 1:2.26 | |
205 | Requires: gtk+3-devel >= 3.0 | |
206 | Requires: libdbusmenu-devel >= 0.5.90 | |
207 | ||
208 | %description gtk3-devel | |
209 | This package contains the header files for developing applications | |
210 | that use libappindicator (GTK+ 3.x version). | |
211 | ||
212 | %description gtk3-devel -l pl.UTF-8 | |
213 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
214 | wykorzystujących bibliotekę libappindicator (w wersji dla GTK+ 3.x). | |
215 | ||
216 | %package gtk3-static | |
217 | Summary: Static libappindicator library (GTK+ 3.x version) | |
218 | Summary(pl.UTF-8): Statyczna biblioteka libappindicator (wersja dla GTK+ 3.x) | |
219 | Group: Development/Libraries | |
220 | Requires: %{name}-gtk3-devel = %{version}-%{release} | |
221 | ||
222 | %description gtk3-static | |
223 | Static libappindicator library (GTK+ 3.x version). | |
224 | ||
225 | %description gtk3-static -l pl.UTF-8 | |
226 | Statyczna biblioteka libappindicator (wersja dla GTK+ 3.x). | |
227 | ||
228 | %package -n vala-libappindicator-gtk3 | |
229 | Summary: Vala API for libappindicator library (GTK+ 3.x version) | |
230 | Summary(pl.UTF-8): API języka Vala do biblioteki libappindicator (wersja GTK+ 3.x) | |
231 | Group: Development/Libraries | |
232 | Requires: %{name}-gtk3-devel = %{version}-%{release} | |
233 | Requires: vala >= 2:0.14.0 | |
234 | ||
235 | %description -n vala-libappindicator-gtk3 | |
236 | Vala API for libappindicator library (GTK+ 3.x version). | |
237 | ||
238 | %description -n vala-libappindicator-gtk3 -l pl.UTF-8 | |
239 | API języka Vala do biblioteki libappindicator (wersja GTK+ 3.x). | |
240 | ||
241 | %package apidocs | |
242 | Summary: API documentation for libappindicator library | |
243 | Summary(pl.UTF-8): Dokumentacja API biblioteki libappindicator | |
244 | Group: Documentation | |
245 | ||
246 | %description apidocs | |
247 | API documentation for libappindicator library (both GTK+ 2.x and 3.x | |
248 | based). | |
249 | ||
250 | %description apidocs -l pl.UTF-8 | |
251 | Dokumentacja API biblioteki libappindicator (zarówno w wersji GTK+ | |
252 | 2.x, jak i 3.x). | |
253 | ||
254 | %prep | |
255 | %setup -q | |
256 | %patch0 -p1 | |
257 | %patch1 -p1 | |
258 | ||
259 | %build | |
260 | %{__libtoolize} | |
261 | %{__aclocal} | |
262 | %{__autoconf} | |
263 | %{__autoheader} | |
264 | %{__automake} | |
265 | ||
266 | for gtkver in %{?with_gtk2:2} %{?with_gtk3:3} ; do | |
267 | install -d build-gtk$gtkver | |
268 | cd build-gtk$gtkver | |
269 | ../%configure \ | |
270 | --disable-silent-rules \ | |
271 | %{!?with_static_libs:--disable-static} \ | |
272 | --with-gtk=$gtkver \ | |
273 | --with-html-dir=%{_gtkdocdir} | |
ef6ee48e JB |
274 | # -j1 because of racy mono build |
275 | %{__make} -j1 | |
547d32e1 JB |
276 | cd .. |
277 | done | |
278 | ||
279 | %install | |
280 | rm -rf $RPM_BUILD_ROOT | |
281 | ||
282 | for gtkver in %{?with_gtk2:2} %{?with_gtk3:3} ; do | |
283 | %{__make} -C build-gtk$gtkver install -j1 \ | |
284 | DESTDIR=$RPM_BUILD_ROOT | |
285 | done | |
286 | ||
287 | %if %{with gtk2} || %{with gtk3} | |
288 | # obsoleted by pkg-config | |
289 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
290 | ||
291 | %if %{with gtk2} | |
292 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/appindicator/*.la | |
293 | %if %{with static_libs} | |
294 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/appindicator/*.a | |
295 | %endif | |
296 | %py_postclean | |
297 | %else | |
298 | # although mono bindings are built also --with-gtk=3, they are always GTK 2.x based | |
299 | [ ! -d $RPM_BUILD_ROOT%{_prefix}/lib/mono ] || %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/lib/mono | |
300 | %endif | |
301 | %endif | |
302 | ||
303 | %clean | |
304 | rm -rf $RPM_BUILD_ROOT | |
305 | ||
306 | %post gtk2 -p /sbin/ldconfig | |
307 | %postun gtk2 -p /sbin/ldconfig | |
308 | ||
309 | %post gtk3 -p /sbin/ldconfig | |
310 | %postun gtk3 -p /sbin/ldconfig | |
311 | ||
312 | %if %{with gtk2} | |
313 | %files gtk2 | |
314 | %defattr(644,root,root,755) | |
315 | %doc AUTHORS ChangeLog | |
316 | %attr(755,root,root) %{_libdir}/libappindicator.so.*.*.* | |
317 | %attr(755,root,root) %ghost %{_libdir}/libappindicator.so.1 | |
318 | %{_libdir}/girepository-1.0/AppIndicator-0.1.typelib | |
319 | ||
320 | %files gtk2-devel | |
321 | %defattr(644,root,root,755) | |
322 | %attr(755,root,root) %{_libdir}/libappindicator.so | |
323 | %{_includedir}/libappindicator-0.1 | |
324 | %{_datadir}/gir-1.0/AppIndicator-0.1.gir | |
325 | %{_pkgconfigdir}/appindicator-0.1.pc | |
326 | ||
327 | %if %{with static_libs} | |
328 | %files gtk2-static | |
329 | %defattr(644,root,root,755) | |
330 | %{_libdir}/libappindicator.a | |
331 | %endif | |
332 | ||
333 | %if %{with mono} | |
334 | %files -n dotnet-appindicator-sharp-gtk2 | |
335 | %defattr(644,root,root,755) | |
336 | %{_prefix}/lib/mono/gac/appindicator-sharp | |
337 | %{_prefix}/lib/mono/gac/policy.0.0.appindicator-sharp | |
338 | # another location - for non-mono implementations? | |
339 | # we don't use it, so it's disabled by -mono patch | |
340 | #%dir %{_libdir}/cli/appindicator-sharp-0.1 | |
341 | #%{_libdir}/cli/appindicator-sharp-0.1/appindicator-sharp.dll | |
342 | #%{_libdir}/cli/appindicator-sharp-0.1/appindicator-sharp.dll.config | |
343 | #%{_libdir}/cli/appindicator-sharp-0.1/policy.*.appindicator-sharp.* | |
344 | ||
345 | %files -n dotnet-appindicator-sharp-gtk2-devel | |
346 | %defattr(644,root,root,755) | |
347 | %{_prefix}/lib/mono/appindicator-sharp | |
348 | %{_pkgconfigdir}/appindicator-sharp-0.1.pc | |
349 | %endif | |
350 | ||
351 | %files -n python-appindicator-gtk2 | |
352 | %defattr(644,root,root,755) | |
353 | %dir %{py_sitedir}/appindicator | |
354 | %attr(755,root,root) %{py_sitedir}/appindicator/_appindicator.so | |
355 | %{py_sitedir}/appindicator/__init__.py[co] | |
356 | ||
357 | %files -n python-appindicator-gtk2-devel | |
358 | %defattr(644,root,root,755) | |
359 | %{_datadir}/pygtk/2.0/defs/appindicator.defs | |
360 | ||
361 | %if %{with vala} | |
362 | %files -n vala-libappindicator-gtk2 | |
363 | %defattr(644,root,root,755) | |
364 | %{_datadir}/vala/vapi/appindicator-0.1.deps | |
365 | %{_datadir}/vala/vapi/appindicator-0.1.vapi | |
366 | %endif | |
367 | %endif | |
368 | ||
369 | %if %{with gtk3} | |
370 | %files gtk3 | |
371 | %defattr(644,root,root,755) | |
372 | %doc AUTHORS ChangeLog | |
373 | %attr(755,root,root) %{_libdir}/libappindicator3.so.*.*.* | |
374 | %attr(755,root,root) %ghost %{_libdir}/libappindicator3.so.1 | |
375 | %{_libdir}/girepository-1.0/AppIndicator3-0.1.typelib | |
376 | ||
377 | %files gtk3-devel | |
378 | %defattr(644,root,root,755) | |
379 | %attr(755,root,root) %{_libdir}/libappindicator3.so | |
380 | %{_includedir}/libappindicator3-0.1 | |
381 | %{_datadir}/gir-1.0/AppIndicator3-0.1.gir | |
382 | %{_pkgconfigdir}/appindicator3-0.1.pc | |
383 | ||
384 | %if %{with static_libs} | |
385 | %files gtk3-static | |
386 | %defattr(644,root,root,755) | |
387 | %{_libdir}/libappindicator3.a | |
388 | %endif | |
389 | ||
390 | %if %{with vala} | |
391 | %files -n vala-libappindicator-gtk3 | |
392 | %defattr(644,root,root,755) | |
393 | %{_datadir}/vala/vapi/appindicator3-0.1.deps | |
394 | %{_datadir}/vala/vapi/appindicator3-0.1.vapi | |
395 | %endif | |
396 | %endif | |
397 | ||
398 | %files apidocs | |
399 | %defattr(644,root,root,755) | |
400 | %{_gtkdocdir}/libappindicator |