]> git.pld-linux.org Git - packages/libayatana-appindicator.git/blob - libappindicator.spec
- fix building with mono 4.x
[packages/libayatana-appindicator.git] / libappindicator.spec
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  dotnet          # Mono bindings
7 %bcond_without  vala            # Vala APIs
8
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
15 Summary:        Application indicators library
16 Summary(pl.UTF-8):      Biblioteka wskaźników aplikacji
17 Name:           libappindicator
18 Version:        12.10.0
19 Release:        6
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 Patch2:         mono4.patch
28 URL:            https://launchpad.net/libappindicator
29 BuildRequires:  autoconf >= 2.64
30 BuildRequires:  automake >= 1:1.11
31 BuildRequires:  dbus-glib-devel >= 0.82
32 %{?with_dotnet:BuildRequires:   dotnet-gtk-sharp2-devel >= 2.12.1}
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
43 %{?with_dotnet:BuildRequires:   mono-csharp >= 1.0}
44 # for mono-nunit >= 2.4.7
45 %{?with_dotnet:BuildRequires:   mono-devel >= 2.4.7}
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
50 BuildRequires:  sed >= 4.0
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
92 Requires:       %{name}-gtk2 = %{version}-%{release}
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
177 %if "%{_rpmversion}" >= "5"
178 BuildArch:      noarch
179 %endif
180
181 %description -n vala-libappindicator-gtk2
182 Vala API for libappindicator library (GTK+ 2.x version).
183
184 %description -n vala-libappindicator-gtk2 -l pl.UTF-8
185 API języka Vala do biblioteki libappindicator (wersja GTK+ 2.x).
186
187 %package gtk3
188 Summary:        Application indicators library (GTK+ 3.x version)
189 Summary(pl.UTF-8):      Biblioteka wskaźników aplikacji (wersja dla GTK+ 3.x)
190 Group:          Libraries
191 Requires:       glib2 >= 1:2.26
192 Requires:       gtk+3 >= 3.0
193 Requires:       libdbusmenu-gtk3 >= 0.5.90
194 Requires:       libindicator-gtk3 >= 0.4.93
195
196 %description gtk3
197 A library to allow applications to export a menu into the Unity Menu
198 bar. Based on KSNI it also works in KDE and will fallback to generic
199 Systray support if none of those are available.
200
201 This package contains GTK+ 3.x based version of libappindicator.
202
203 %description gtk3 -l pl.UTF-8
204 Biblioteka pozwalająca aplikacjom eksportować menu do paska menu
205 Unity. Jest oparta na KSNI, działa także w KDE, a w przypadku braku
206 obu - potrafi korzystać ze zwykłej szufladki systemowej.
207
208 Ten pakiet zawiera bibliotekę libappindicator opartą na GTK+ 3.x.
209
210 %package gtk3-devel
211 Summary:        Development files for libappindicator (GTK+ 3.x version)
212 Summary(pl.UTF-8):      Pliki programistyczne biblioteki libappindicator (wersja dla GTK+ 3.x)
213 Group:          Development/Libraries
214 Requires:       %{name}-gtk3 = %{version}-%{release}
215 Requires:       glib2-devel >= 1:2.26
216 Requires:       gtk+3-devel >= 3.0
217 Requires:       libdbusmenu-devel >= 0.5.90
218
219 %description gtk3-devel
220 This package contains the header files for developing applications
221 that use libappindicator (GTK+ 3.x version).
222
223 %description gtk3-devel -l pl.UTF-8
224 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
225 wykorzystujących bibliotekę libappindicator (w wersji dla GTK+ 3.x).
226
227 %package gtk3-static
228 Summary:        Static libappindicator library (GTK+ 3.x version)
229 Summary(pl.UTF-8):      Statyczna biblioteka libappindicator (wersja dla GTK+ 3.x)
230 Group:          Development/Libraries
231 Requires:       %{name}-gtk3-devel = %{version}-%{release}
232
233 %description gtk3-static
234 Static libappindicator library (GTK+ 3.x version).
235
236 %description gtk3-static -l pl.UTF-8
237 Statyczna biblioteka libappindicator (wersja dla GTK+ 3.x).
238
239 %package -n vala-libappindicator-gtk3
240 Summary:        Vala API for libappindicator library (GTK+ 3.x version)
241 Summary(pl.UTF-8):      API języka Vala do biblioteki libappindicator (wersja GTK+ 3.x)
242 Group:          Development/Libraries
243 Requires:       %{name}-gtk3-devel = %{version}-%{release}
244 Requires:       vala >= 2:0.14.0
245
246 %description -n vala-libappindicator-gtk3
247 Vala API for libappindicator library (GTK+ 3.x version).
248
249 %description -n vala-libappindicator-gtk3 -l pl.UTF-8
250 API języka Vala do biblioteki libappindicator (wersja GTK+ 3.x).
251
252 %package apidocs
253 Summary:        API documentation for libappindicator library
254 Summary(pl.UTF-8):      Dokumentacja API biblioteki libappindicator
255 Group:          Documentation
256 %if "%{_rpmversion}" >= "5"
257 BuildArch:      noarch
258 %endif
259
260 %description apidocs
261 API documentation for libappindicator library (both GTK+ 2.x and 3.x
262 based).
263
264 %description apidocs -l pl.UTF-8
265 Dokumentacja API biblioteki libappindicator (zarówno w wersji GTK+
266 2.x, jak i 3.x).
267
268 %prep
269 %setup -q
270 %patch0 -p1
271 %patch1 -p1
272 %patch2 -p1
273
274 # to allow deprecation warnings
275 %{__sed} -i -e 's/-Werror //' src/Makefile.am
276
277 %build
278 %{__libtoolize}
279 %{__aclocal}
280 %{__autoconf}
281 %{__autoheader}
282 %{__automake}
283
284 for gtkver in %{?with_gtk2:2} %{?with_gtk3:3}; do
285 install -d build-gtk$gtkver
286 cd build-gtk$gtkver
287 ../%configure \
288         --disable-silent-rules \
289         %{!?with_static_libs:--disable-static} \
290         --with-gtk=$gtkver \
291         --with-html-dir=%{_gtkdocdir}
292 # -j1 because of racy mono build
293 %{__make} -j1
294 cd ..
295 done
296
297 %install
298 rm -rf $RPM_BUILD_ROOT
299
300 for gtkver in %{?with_gtk2:2} %{?with_gtk3:3}; do
301 %{__make} -C build-gtk$gtkver install -j1 \
302         DESTDIR=$RPM_BUILD_ROOT
303 done
304
305 %if %{with gtk2} || %{with gtk3}
306 # obsoleted by pkg-config
307 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
308
309 %if %{with gtk2}
310 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/appindicator/*.la
311 %if %{with static_libs}
312 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/appindicator/*.a
313 %endif
314 %py_postclean
315 %else
316 # although mono bindings are built also --with-gtk=3, they are always GTK 2.x based
317 [ ! -d $RPM_BUILD_ROOT%{_prefix}/lib/mono ] || %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/lib/mono
318 %endif
319 %endif
320
321 %clean
322 rm -rf $RPM_BUILD_ROOT
323
324 %post   gtk2 -p /sbin/ldconfig
325 %postun gtk2 -p /sbin/ldconfig
326
327 %post   gtk3 -p /sbin/ldconfig
328 %postun gtk3 -p /sbin/ldconfig
329
330 %if %{with gtk2}
331 %files gtk2
332 %defattr(644,root,root,755)
333 %doc AUTHORS ChangeLog
334 %attr(755,root,root) %{_libdir}/libappindicator.so.*.*.*
335 %attr(755,root,root) %ghost %{_libdir}/libappindicator.so.1
336 %{_libdir}/girepository-1.0/AppIndicator-0.1.typelib
337
338 %files gtk2-devel
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_libdir}/libappindicator.so
341 %{_includedir}/libappindicator-0.1
342 %{_datadir}/gir-1.0/AppIndicator-0.1.gir
343 %{_pkgconfigdir}/appindicator-0.1.pc
344
345 %if %{with static_libs}
346 %files gtk2-static
347 %defattr(644,root,root,755)
348 %{_libdir}/libappindicator.a
349 %endif
350
351 %if %{with dotnet}
352 %files -n dotnet-appindicator-sharp-gtk2
353 %defattr(644,root,root,755)
354 %{_prefix}/lib/mono/gac/appindicator-sharp
355 %{_prefix}/lib/mono/gac/policy.0.0.appindicator-sharp
356 # another location - for non-mono implementations?
357 # we don't use it, so it's disabled by -mono patch
358 #%dir %{_libdir}/cli/appindicator-sharp-0.1
359 #%{_libdir}/cli/appindicator-sharp-0.1/appindicator-sharp.dll
360 #%{_libdir}/cli/appindicator-sharp-0.1/appindicator-sharp.dll.config
361 #%{_libdir}/cli/appindicator-sharp-0.1/policy.*.appindicator-sharp.*
362
363 %files -n dotnet-appindicator-sharp-gtk2-devel
364 %defattr(644,root,root,755)
365 %{_prefix}/lib/mono/appindicator-sharp
366 %{_pkgconfigdir}/appindicator-sharp-0.1.pc
367 %endif
368
369 %files -n python-appindicator-gtk2
370 %defattr(644,root,root,755)
371 %dir %{py_sitedir}/appindicator
372 %attr(755,root,root) %{py_sitedir}/appindicator/_appindicator.so
373 %{py_sitedir}/appindicator/__init__.py[co]
374
375 %files -n python-appindicator-gtk2-devel
376 %defattr(644,root,root,755)
377 %{_datadir}/pygtk/2.0/defs/appindicator.defs
378
379 %if %{with vala}
380 %files -n vala-libappindicator-gtk2
381 %defattr(644,root,root,755)
382 %{_datadir}/vala/vapi/appindicator-0.1.deps
383 %{_datadir}/vala/vapi/appindicator-0.1.vapi
384 %endif
385 %endif
386
387 %if %{with gtk3}
388 %files gtk3
389 %defattr(644,root,root,755)
390 %doc AUTHORS ChangeLog
391 %attr(755,root,root) %{_libdir}/libappindicator3.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libappindicator3.so.1
393 %{_libdir}/girepository-1.0/AppIndicator3-0.1.typelib
394
395 %files gtk3-devel
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/libappindicator3.so
398 %{_includedir}/libappindicator3-0.1
399 %{_datadir}/gir-1.0/AppIndicator3-0.1.gir
400 %{_pkgconfigdir}/appindicator3-0.1.pc
401
402 %if %{with static_libs}
403 %files gtk3-static
404 %defattr(644,root,root,755)
405 %{_libdir}/libappindicator3.a
406 %endif
407
408 %if %{with vala}
409 %files -n vala-libappindicator-gtk3
410 %defattr(644,root,root,755)
411 %{_datadir}/vala/vapi/appindicator3-0.1.deps
412 %{_datadir}/vala/vapi/appindicator3-0.1.vapi
413 %endif
414 %endif
415
416 %files apidocs
417 %defattr(644,root,root,755)
418 %{_gtkdocdir}/libappindicator
This page took 0.122576 seconds and 3 git commands to generate.