]>
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 | |
4014c51e JP |
17 | Name: libayatana-appindicator |
18 | Version: 0.5.5 | |
19 | Release: 1 | |
547d32e1 JB |
20 | License: LGPL v2.1 or LGPL v3 |
21 | Group: Libraries | |
4014c51e JP |
22 | #Source0Download: https://github.com/AyatanaIndicators/libayatana-appindicator/releases |
23 | Source0: https://github.com/AyatanaIndicators/libayatana-appindicator/archive/%{version}/%{name}-%{version}.tar.gz | |
24 | # Source0-md5: fd6705ad2793dced95056036ecd73b7f | |
25 | Patch0: libappindicator-mono.patch | |
26 | Patch1: mono4.patch | |
27 | URL: https://github.com/AyatanaIndicators/libayatana-appindicator | |
547d32e1 JB |
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} |
4014c51e | 32 | BuildRequires: glib2-devel >= 1:2.35.4 |
547d32e1 JB |
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} | |
4014c51e JP |
36 | BuildRequires: gtk-doc >= 1.14 |
37 | %{?with_gtk2:BuildRequires: libayatana-indicator-devel >= 0.6.0} | |
38 | %{?with_gtk3:BuildRequires: libayatana-indicator-gtk3-devel >= 0.6.0} | |
547d32e1 JB |
39 | %{?with_gtk2:BuildRequires: libdbusmenu-gtk2-devel >= 0.5.90} |
40 | %{?with_gtk3:BuildRequires: libdbusmenu-gtk3-devel >= 0.5.90} | |
547d32e1 | 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 | 45 | BuildRequires: pkgconfig |
c498e02f | 46 | BuildRequires: sed >= 4.0 |
547d32e1 JB |
47 | %{?with_vala:BuildRequires: vala >= 2:0.14.0} |
48 | BuildRequires: which | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %description | |
52 | A library to allow applications to export a menu into the Unity Menu | |
53 | bar. Based on KSNI it also works in KDE and will fallback to generic | |
54 | Systray support if none of those are available. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Biblioteka pozwalająca aplikacjom eksportować menu do paska menu | |
58 | Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku | |
59 | obu - potrafi korzystać ze zwykłej szufladki systemowej. | |
60 | ||
61 | %package gtk2 | |
62 | Summary: Application indicators library (GTK+ 2.x version) | |
63 | Summary(pl.UTF-8): Biblioteka wskaźników aplikacji (wersja dla GTK+ 2.x) | |
64 | Group: Libraries | |
4014c51e | 65 | Requires: glib2 >= 1:2.35.4 |
547d32e1 | 66 | Requires: gtk+2 >= 2:2.18 |
4014c51e | 67 | Requires: libayatana-indicator >= 0.6.0 |
547d32e1 | 68 | Requires: libdbusmenu-gtk2 >= 0.5.90 |
547d32e1 JB |
69 | |
70 | %description gtk2 | |
71 | A library to allow applications to export a menu into the Unity Menu | |
72 | bar. Based on KSNI it also works in KDE and will fallback to generic | |
73 | Systray support if none of those are available. | |
74 | ||
4014c51e JP |
75 | This package contains GTK+ 2.x based version of |
76 | libayatana-appindicator. | |
547d32e1 JB |
77 | |
78 | %description gtk2 -l pl.UTF-8 | |
79 | Biblioteka pozwalająca aplikacjom eksportować menu do paska menu | |
80 | Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku | |
81 | obu - potrafi korzystać ze zwykłej szufladki systemowej. | |
82 | ||
4014c51e JP |
83 | Ten pakiet zawiera bibliotekę libayatana-appindicator opartą na GTK+ |
84 | 2.x. | |
547d32e1 JB |
85 | |
86 | %package gtk2-devel | |
4014c51e JP |
87 | Summary: Development files for libayatana-appindicator (GTK+ 2.x version) |
88 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libayatana-appindicator (wersja dla GTK+ 2.x) | |
547d32e1 | 89 | Group: Development/Libraries |
ef6ee48e | 90 | Requires: %{name}-gtk2 = %{version}-%{release} |
4014c51e | 91 | Requires: glib2-devel >= 1:2.35.4 |
547d32e1 JB |
92 | Requires: gtk+2-devel >= 2:2.18 |
93 | Requires: libdbusmenu-devel >= 0.5.90 | |
94 | ||
95 | %description gtk2-devel | |
96 | This package contains the header files for developing applications | |
4014c51e | 97 | that use libayatana-appindicator (GTK+ 2.x version). |
547d32e1 JB |
98 | |
99 | %description gtk2-devel -l pl.UTF-8 | |
100 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
4014c51e JP |
101 | wykorzystujących bibliotekę libayatana-appindicator (w wersji dla GTK+ |
102 | 2.x). | |
547d32e1 JB |
103 | |
104 | %package gtk2-static | |
4014c51e JP |
105 | Summary: Static libayatana-appindicator library (GTK+ 2.x version) |
106 | Summary(pl.UTF-8): Statyczna biblioteka libayatana-appindicator (wersja dla GTK+ 2.x) | |
547d32e1 JB |
107 | Group: Development/Libraries |
108 | Requires: %{name}-gtk2-devel = %{version}-%{release} | |
109 | ||
110 | %description gtk2-static | |
4014c51e | 111 | Static libayatana-appindicator library (GTK+ 2.x version). |
547d32e1 JB |
112 | |
113 | %description gtk2-static -l pl.UTF-8 | |
4014c51e | 114 | Statyczna biblioteka libayatana-appindicator (wersja dla GTK+ 2.x). |
547d32e1 JB |
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 | |
4014c51e JP |
124 | Mono/.NET binding for libayatana-appindicator library (GTK+ 2.x |
125 | version). | |
547d32e1 JB |
126 | |
127 | %description -n dotnet-appindicator-sharp-gtk2 -l pl.UTF-8 | |
4014c51e JP |
128 | Wiązania Mono/.NET do biblioteki libayatana-appindicator (wersja GTK+ |
129 | 2.x). | |
547d32e1 JB |
130 | |
131 | %package -n dotnet-appindicator-sharp-gtk2-devel | |
132 | Summary: Development files for appindicator .NET binding (GTK+ 2.x version) | |
133 | Summary(pl.UTF-8): Pliki programistyczne wiązania .NET do biblioteki appindicator (wersja GTK+ 2.x) | |
134 | Group: Development/Libraries | |
135 | Requires: dotnet-appindicator-sharp-gtk2 = %{version}-%{release} | |
136 | Requires: dotnet-gtk-sharp2-devel >= 2.12.1 | |
137 | ||
138 | %description -n dotnet-appindicator-sharp-gtk2-devel | |
139 | Development files for appindicator .NET binding (GTK+ 2.x version). | |
140 | ||
141 | %description -n dotnet-appindicator-sharp-gtk2-devel -l pl.UTF-8 | |
142 | Pliki programistyczne wiązania .NET do biblioteki appindicator (wersja | |
143 | GTK+ 2.x). | |
144 | ||
4014c51e JP |
145 | %package -n vala-libayatana-appindicator-gtk2 |
146 | Summary: Vala API for libayatana-appindicator library (GTK+ 2.x version) | |
147 | Summary(pl.UTF-8): API języka Vala do biblioteki libayatana-appindicator (wersja GTK+ 2.x) | |
547d32e1 JB |
148 | Group: Development/Libraries |
149 | Requires: %{name}-gtk2-devel = %{version}-%{release} | |
150 | Requires: vala >= 2:0.14.0 | |
5d75cbb9 | 151 | BuildArch: noarch |
547d32e1 | 152 | |
4014c51e JP |
153 | %description -n vala-libayatana-appindicator-gtk2 |
154 | Vala API for libayatana-appindicator library (GTK+ 2.x version). | |
547d32e1 | 155 | |
4014c51e JP |
156 | %description -n vala-libayatana-appindicator-gtk2 -l pl.UTF-8 |
157 | API języka Vala do biblioteki libayatana-appindicator (wersja GTK+ | |
158 | 2.x). | |
547d32e1 JB |
159 | |
160 | %package gtk3 | |
161 | Summary: Application indicators library (GTK+ 3.x version) | |
162 | Summary(pl.UTF-8): Biblioteka wskaźników aplikacji (wersja dla GTK+ 3.x) | |
163 | Group: Libraries | |
4014c51e | 164 | Requires: glib2 >= 1:2.35.4 |
547d32e1 | 165 | Requires: gtk+3 >= 3.0 |
4014c51e | 166 | Requires: libayatana-indicator-gtk3 >= 0.6.0 |
547d32e1 | 167 | Requires: libdbusmenu-gtk3 >= 0.5.90 |
547d32e1 JB |
168 | |
169 | %description gtk3 | |
170 | A library to allow applications to export a menu into the Unity Menu | |
171 | bar. Based on KSNI it also works in KDE and will fallback to generic | |
172 | Systray support if none of those are available. | |
173 | ||
4014c51e JP |
174 | This package contains GTK+ 3.x based version of |
175 | libayatana-appindicator. | |
547d32e1 JB |
176 | |
177 | %description gtk3 -l pl.UTF-8 | |
178 | Biblioteka pozwalająca aplikacjom eksportować menu do paska menu | |
179 | Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku | |
180 | obu - potrafi korzystać ze zwykłej szufladki systemowej. | |
181 | ||
4014c51e JP |
182 | Ten pakiet zawiera bibliotekę libayatana-appindicator opartą na GTK+ |
183 | 3.x. | |
547d32e1 JB |
184 | |
185 | %package gtk3-devel | |
4014c51e JP |
186 | Summary: Development files for libayatana-appindicator (GTK+ 3.x version) |
187 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libayatana-appindicator (wersja dla GTK+ 3.x) | |
547d32e1 JB |
188 | Group: Development/Libraries |
189 | Requires: %{name}-gtk3 = %{version}-%{release} | |
4014c51e | 190 | Requires: glib2-devel >= 1:2.35.4 |
547d32e1 JB |
191 | Requires: gtk+3-devel >= 3.0 |
192 | Requires: libdbusmenu-devel >= 0.5.90 | |
193 | ||
194 | %description gtk3-devel | |
195 | This package contains the header files for developing applications | |
4014c51e | 196 | that use libayatana-appindicator (GTK+ 3.x version). |
547d32e1 JB |
197 | |
198 | %description gtk3-devel -l pl.UTF-8 | |
199 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
4014c51e JP |
200 | wykorzystujących bibliotekę libayatana-appindicator (w wersji dla GTK+ |
201 | 3.x). | |
547d32e1 JB |
202 | |
203 | %package gtk3-static | |
4014c51e JP |
204 | Summary: Static libayatana-appindicator library (GTK+ 3.x version) |
205 | Summary(pl.UTF-8): Statyczna biblioteka libayatana-appindicator (wersja dla GTK+ 3.x) | |
547d32e1 JB |
206 | Group: Development/Libraries |
207 | Requires: %{name}-gtk3-devel = %{version}-%{release} | |
208 | ||
209 | %description gtk3-static | |
4014c51e | 210 | Static libayatana-appindicator library (GTK+ 3.x version). |
547d32e1 JB |
211 | |
212 | %description gtk3-static -l pl.UTF-8 | |
4014c51e | 213 | Statyczna biblioteka libayatana-appindicator (wersja dla GTK+ 3.x). |
547d32e1 | 214 | |
4014c51e JP |
215 | %package -n vala-libayatana-appindicator-gtk3 |
216 | Summary: Vala API for libayatana-appindicator library (GTK+ 3.x version) | |
217 | Summary(pl.UTF-8): API języka Vala do biblioteki libayatana-appindicator (wersja GTK+ 3.x) | |
547d32e1 JB |
218 | Group: Development/Libraries |
219 | Requires: %{name}-gtk3-devel = %{version}-%{release} | |
220 | Requires: vala >= 2:0.14.0 | |
221 | ||
4014c51e JP |
222 | %description -n vala-libayatana-appindicator-gtk3 |
223 | Vala API for libayatana-appindicator library (GTK+ 3.x version). | |
547d32e1 | 224 | |
4014c51e JP |
225 | %description -n vala-libayatana-appindicator-gtk3 -l pl.UTF-8 |
226 | API języka Vala do biblioteki libayatana-appindicator (wersja GTK+ | |
227 | 3.x). | |
547d32e1 JB |
228 | |
229 | %package apidocs | |
4014c51e JP |
230 | Summary: API documentation for libayatana-appindicator library |
231 | Summary(pl.UTF-8): Dokumentacja API biblioteki libayatana-appindicator | |
547d32e1 | 232 | Group: Documentation |
a0b7f175 | 233 | BuildArch: noarch |
547d32e1 JB |
234 | |
235 | %description apidocs | |
4014c51e JP |
236 | API documentation for libayatana-appindicator library (both GTK+ 2.x |
237 | and 3.x based). | |
547d32e1 JB |
238 | |
239 | %description apidocs -l pl.UTF-8 | |
4014c51e JP |
240 | Dokumentacja API biblioteki libayatana-appindicator (zarówno w wersji |
241 | GTK+ 2.x, jak i 3.x). | |
547d32e1 JB |
242 | |
243 | %prep | |
244 | %setup -q | |
245 | %patch0 -p1 | |
246 | %patch1 -p1 | |
c498e02f | 247 | |
547d32e1 | 248 | %build |
4014c51e | 249 | %{__gtkdocize} |
547d32e1 JB |
250 | %{__libtoolize} |
251 | %{__aclocal} | |
252 | %{__autoconf} | |
253 | %{__autoheader} | |
254 | %{__automake} | |
255 | ||
a0b7f175 | 256 | for gtkver in %{?with_gtk2:2} %{?with_gtk3:3}; do |
547d32e1 JB |
257 | install -d build-gtk$gtkver |
258 | cd build-gtk$gtkver | |
259 | ../%configure \ | |
260 | --disable-silent-rules \ | |
261 | %{!?with_static_libs:--disable-static} \ | |
262 | --with-gtk=$gtkver \ | |
263 | --with-html-dir=%{_gtkdocdir} | |
ef6ee48e | 264 | # -j1 because of racy mono build |
5e1df5c8 | 265 | %{__make} %{?with_dotnet:-j1} |
547d32e1 JB |
266 | cd .. |
267 | done | |
268 | ||
269 | %install | |
270 | rm -rf $RPM_BUILD_ROOT | |
271 | ||
a0b7f175 | 272 | for gtkver in %{?with_gtk2:2} %{?with_gtk3:3}; do |
547d32e1 JB |
273 | %{__make} -C build-gtk$gtkver install -j1 \ |
274 | DESTDIR=$RPM_BUILD_ROOT | |
275 | done | |
276 | ||
277 | %if %{with gtk2} || %{with gtk3} | |
278 | # obsoleted by pkg-config | |
279 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
547d32e1 JB |
280 | %endif |
281 | ||
4014c51e | 282 | |
547d32e1 JB |
283 | %clean |
284 | rm -rf $RPM_BUILD_ROOT | |
285 | ||
286 | %post gtk2 -p /sbin/ldconfig | |
287 | %postun gtk2 -p /sbin/ldconfig | |
288 | ||
289 | %post gtk3 -p /sbin/ldconfig | |
290 | %postun gtk3 -p /sbin/ldconfig | |
291 | ||
292 | %if %{with gtk2} | |
293 | %files gtk2 | |
294 | %defattr(644,root,root,755) | |
295 | %doc AUTHORS ChangeLog | |
4014c51e JP |
296 | %attr(755,root,root) %{_libdir}/libayatana-appindicator.so.*.*.* |
297 | %attr(755,root,root) %ghost %{_libdir}/libayatana-appindicator.so.1 | |
298 | %{_libdir}/girepository-1.0/AyatanaAppIndicator-0.1.typelib | |
547d32e1 JB |
299 | |
300 | %files gtk2-devel | |
301 | %defattr(644,root,root,755) | |
4014c51e JP |
302 | %attr(755,root,root) %{_libdir}/libayatana-appindicator.so |
303 | %{_includedir}/libayatana-appindicator-0.1 | |
304 | %{_datadir}/gir-1.0/AyatanaAppIndicator-0.1.gir | |
305 | %{_pkgconfigdir}/ayatana-appindicator-0.1.pc | |
547d32e1 JB |
306 | |
307 | %if %{with static_libs} | |
308 | %files gtk2-static | |
309 | %defattr(644,root,root,755) | |
4014c51e | 310 | %{_libdir}/libayatana-appindicator.a |
547d32e1 JB |
311 | %endif |
312 | ||
c498e02f | 313 | %if %{with dotnet} |
547d32e1 JB |
314 | %files -n dotnet-appindicator-sharp-gtk2 |
315 | %defattr(644,root,root,755) | |
316 | %{_prefix}/lib/mono/gac/appindicator-sharp | |
317 | %{_prefix}/lib/mono/gac/policy.0.0.appindicator-sharp | |
318 | # another location - for non-mono implementations? | |
319 | # we don't use it, so it's disabled by -mono patch | |
320 | #%dir %{_libdir}/cli/appindicator-sharp-0.1 | |
321 | #%{_libdir}/cli/appindicator-sharp-0.1/appindicator-sharp.dll | |
322 | #%{_libdir}/cli/appindicator-sharp-0.1/appindicator-sharp.dll.config | |
323 | #%{_libdir}/cli/appindicator-sharp-0.1/policy.*.appindicator-sharp.* | |
324 | ||
325 | %files -n dotnet-appindicator-sharp-gtk2-devel | |
326 | %defattr(644,root,root,755) | |
327 | %{_prefix}/lib/mono/appindicator-sharp | |
328 | %{_pkgconfigdir}/appindicator-sharp-0.1.pc | |
329 | %endif | |
330 | ||
547d32e1 | 331 | %if %{with vala} |
4014c51e | 332 | %files -n vala-libayatana-appindicator-gtk2 |
547d32e1 | 333 | %defattr(644,root,root,755) |
4014c51e JP |
334 | %{_datadir}/vala/vapi/ayatana-appindicator-0.1.deps |
335 | %{_datadir}/vala/vapi/ayatana-appindicator-0.1.vapi | |
547d32e1 JB |
336 | %endif |
337 | %endif | |
338 | ||
339 | %if %{with gtk3} | |
340 | %files gtk3 | |
341 | %defattr(644,root,root,755) | |
342 | %doc AUTHORS ChangeLog | |
4014c51e JP |
343 | %attr(755,root,root) %{_libdir}/libayatana-appindicator3.so.*.*.* |
344 | %attr(755,root,root) %ghost %{_libdir}/libayatana-appindicator3.so.1 | |
345 | %{_libdir}/girepository-1.0/AyatanaAppIndicator3-0.1.typelib | |
547d32e1 JB |
346 | |
347 | %files gtk3-devel | |
348 | %defattr(644,root,root,755) | |
4014c51e JP |
349 | %attr(755,root,root) %{_libdir}/libayatana-appindicator3.so |
350 | %{_includedir}/libayatana-appindicator3-0.1 | |
351 | %{_datadir}/gir-1.0/AyatanaAppIndicator3-0.1.gir | |
352 | %{_pkgconfigdir}/ayatana-appindicator3-0.1.pc | |
547d32e1 JB |
353 | |
354 | %if %{with static_libs} | |
355 | %files gtk3-static | |
356 | %defattr(644,root,root,755) | |
4014c51e | 357 | %{_libdir}/libayatana-appindicator3.a |
547d32e1 JB |
358 | %endif |
359 | ||
360 | %if %{with vala} | |
4014c51e | 361 | %files -n vala-libayatana-appindicator-gtk3 |
547d32e1 | 362 | %defattr(644,root,root,755) |
4014c51e JP |
363 | %{_datadir}/vala/vapi/ayatana-appindicator3-0.1.deps |
364 | %{_datadir}/vala/vapi/ayatana-appindicator3-0.1.vapi | |
547d32e1 JB |
365 | %endif |
366 | %endif | |
367 |