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