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