]>
Commit | Line | Data |
---|---|---|
2c60a8a7 AF |
1 | # |
2 | # Conditional build: | |
c29a5766 | 3 | %bcond_without gtk3 # gtk+3 support |
a9c15d83 | 4 | %bcond_with gnome2 # with GDK ready sound |
2c60a8a7 | 5 | # |
d12b2a0d | 6 | Summary: libcanberra - the portable sound event library |
9f640b01 JB |
7 | Summary(pl.UTF-8): libcanberra - przenośna biblioteka zdarzeń dźwiękowych |
8 | Name: libcanberra | |
f61ee257 MB |
9 | Version: 0.30 |
10 | Release: 1 | |
14347ec7 | 11 | License: LGPL v2+ |
d12b2a0d | 12 | Group: Libraries |
f61ee257 MB |
13 | Source0: http://0pointer.de/lennart/projects/libcanberra/%{name}-%{version}.tar.xz |
14 | # Source0-md5: 34cb7e4430afaf6f447c4ebdb9b42072 | |
ed9f9954 | 15 | URL: http://0pointer.de/lennart/projects/libcanberra/ |
14347ec7 | 16 | BuildRequires: alsa-lib-devel >= 1.0.0 |
f61ee257 MB |
17 | BuildRequires: autoconf >= 2.68 |
18 | BuildRequires: automake >= 1:1.11 | |
1ec26070 | 19 | BuildRequires: docbook-dtd412-xml |
f61ee257 MB |
20 | BuildRequires: glib2-devel >= 1:2.32.0 |
21 | BuildRequires: gstreamer-devel >= 1.0.0 | |
4a15ba89 | 22 | BuildRequires: gtk+2-devel >= 2:2.20.0 |
f61ee257 MB |
23 | %if %{with gtk3} |
24 | BuildRequires: gtk+3-devel >= 3.0.0 | |
25 | %endif | |
14347ec7 | 26 | BuildRequires: gtk-doc >= 1.9 |
d12b2a0d | 27 | BuildRequires: libltdl-devel |
104ffcd1 | 28 | BuildRequires: libtool >= 2:2.2.0 |
d12b2a0d | 29 | BuildRequires: libvorbis-devel |
14347ec7 | 30 | BuildRequires: pkgconfig |
d12b2a0d | 31 | BuildRequires: pulseaudio-devel >= 0.9.11-1 |
2c60a8a7 | 32 | BuildRequires: rpmbuild(macros) >= 1.527 |
25f388d6 | 33 | BuildRequires: tdb-devel >= 2:1.1 |
a9c15d83 | 34 | BuildRequires: udev-devel >= 1:160 |
f61ee257 | 35 | BuildRequires: tar >= 1:1.22 |
a9c15d83 | 36 | BuildRequires: xorg-lib-libX11-devel |
f61ee257 | 37 | BuildRequires: xz |
64fdde46 | 38 | Requires: alsa-lib >= 1.0.0 |
a9c15d83 | 39 | Requires: glib2 >= 1:2.32.0 |
f61ee257 | 40 | Requires: gstreamer >= 1.0.0 |
d12b2a0d PZ |
41 | Requires: pulseaudio-libs >= 0.9.11-1 |
42 | Requires: sound-theme-freedesktop | |
f61ee257 | 43 | Requires: systemd-units >= 0.38 |
25f388d6 | 44 | Requires: tdb >= 2:1.1 |
a9c15d83 | 45 | Requires: udev-libs >= 1:160 |
d12b2a0d PZ |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
104ffcd1 MB |
48 | %define backenddir %{_libdir}/libcanberra-%{version} |
49 | ||
d12b2a0d PZ |
50 | %description |
51 | A small and lightweight implementation of the XDG Sound Theme | |
52 | Specification (http://0pointer.de/public/sound-theme-spec.html). | |
53 | ||
14347ec7 MB |
54 | %description -l pl.UTF-8 |
55 | Mała i lekka implementacja specyfikacji XDG Sound Theme | |
56 | (http://0pointer.de/public/sound-theme-spec.html). | |
d12b2a0d PZ |
57 | |
58 | %package devel | |
14347ec7 MB |
59 | Summary: Header files for libcanberra library |
60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcanberra | |
d12b2a0d PZ |
61 | Group: Development/Libraries |
62 | Requires: %{name} = %{version}-%{release} | |
d12b2a0d PZ |
63 | |
64 | %description devel | |
14347ec7 MB |
65 | Header files for libcanberra library. |
66 | ||
67 | %description devel -l pl.UTF-8 | |
68 | Pliki nagłówkowe biblioteki libcanberra. | |
69 | ||
70 | %package static | |
71 | Summary: Static libcanberra library | |
72 | Summary(pl.UTF-8): Statyczna biblioteka libcanberra | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-devel = %{version}-%{release} | |
75 | ||
76 | %description static | |
77 | Static libcanberra library. | |
78 | ||
79 | %description static -l pl.UTF-8 | |
80 | Statyczna biblioteka libcanberra. | |
81 | ||
25f388d6 JB |
82 | %package -n vala-libcanberra |
83 | Summary: libcanberra API for Vala language | |
84 | Summary(pl.UTF-8): API biblioteki libcanberra dla języka Vala | |
85 | Group: Development/Libraries | |
86 | Requires: %{name}-devel = %{version}-%{release} | |
87 | ||
88 | %description -n vala-libcanberra | |
89 | libcanberra API for Vala language. | |
90 | ||
91 | %description -n vala-libcanberra -l pl.UTF-8 | |
92 | API biblioteki libcanberra dla języka Vala. | |
93 | ||
14347ec7 MB |
94 | %package gtk |
95 | Summary: GTK+ bindings for libcanberra library | |
96 | Summary(pl.UTF-8): Wiązania GTK+ do biblioteki libcanberra | |
97 | Group: X11/Libraries | |
98 | Requires: %{name} = %{version}-%{release} | |
64fdde46 | 99 | Requires: gtk+2 >= 2:2.20.0 |
14347ec7 MB |
100 | Provides: libcanberra-gtk2 |
101 | Obsoletes: libcanberra-gtk2 | |
102 | ||
103 | %description gtk | |
104 | GTK+ bindings for libcanberra library. | |
105 | ||
106 | %description gtk -l pl.UTF-8 | |
107 | Wiązania GTK+ do biblioteki libcanberra. | |
108 | ||
25f388d6 JB |
109 | %package gtk-devel-common |
110 | Summary: Common header file for libcanberra-gtk libraries | |
111 | Summary(pl.UTF-8): Wspólny plik nagłówkowy bibliotek libcanberra-gtk | |
112 | Group: X11/Development/Libraries | |
113 | ||
114 | %description gtk-devel-common | |
115 | Common header file for libcanberra-gtk libraries. | |
116 | ||
117 | %description gtk-devel-common -l pl.UTF-8 | |
118 | Wspólny plik nagłówkowy bibliotek libcanberra-gtk. | |
119 | ||
14347ec7 | 120 | %package gtk-devel |
25f388d6 JB |
121 | Summary: Development files for libcanberra-gtk library |
122 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libcanberra-gtk | |
14347ec7 | 123 | Group: X11/Development/Libraries |
9f640b01 | 124 | Requires: %{name}-devel = %{version}-%{release} |
14347ec7 | 125 | Requires: %{name}-gtk = %{version}-%{release} |
c29a5766 | 126 | Requires: %{name}-gtk-devel-common = %{version}-%{release} |
4a15ba89 | 127 | Requires: gtk+2-devel >= 2:2.20.0 |
14347ec7 MB |
128 | |
129 | %description gtk-devel | |
25f388d6 | 130 | Development files for libcanberra-gtk library. |
14347ec7 MB |
131 | |
132 | %description gtk-devel -l pl.UTF-8 | |
25f388d6 | 133 | Pliki programistyczne biblioteki libcanberra-gtk. |
14347ec7 MB |
134 | |
135 | %package gtk-static | |
136 | Summary: Static libcanberra-gtk library | |
137 | Summary(pl.UTF-8): Statyczna biblioteka libcanberra-gtk | |
138 | Group: X11/Development/Libraries | |
139 | Requires: %{name}-gtk-devel = %{version}-%{release} | |
140 | ||
141 | %description gtk-static | |
142 | Static libcanberra-gtk library. | |
143 | ||
144 | %description gtk-static -l pl.UTF-8 | |
145 | Statyczna biblioteka libcanberra-gtk. | |
d12b2a0d | 146 | |
25f388d6 JB |
147 | %package -n vala-libcanberra-gtk |
148 | Summary: libcanberra-gtk API for Vala language | |
149 | Summary(pl.UTF-8): API biblioteki libcanberra-gtk dla języka Vala | |
150 | Group: Development/Libraries | |
151 | Requires: %{name}-gtk-devel-common = %{version}-%{release} | |
152 | Requires: vala-libcanberra = %{version}-%{release} | |
c29a5766 | 153 | |
25f388d6 JB |
154 | %description -n vala-libcanberra-gtk |
155 | libcanberra-gtk API for Vala language. | |
c29a5766 | 156 | |
25f388d6 JB |
157 | %description -n vala-libcanberra-gtk -l pl.UTF-8 |
158 | API biblioteki libcanberra-gtk dla języka Vala. | |
c29a5766 | 159 | |
2c60a8a7 AF |
160 | %package gtk3 |
161 | Summary: GTK+ 3.x bindings for libcanberra library | |
162 | Summary(pl.UTF-8): Wiązania GTK+ 3.x do biblioteki libcanberra | |
163 | Group: X11/Libraries | |
164 | Requires: %{name} = %{version}-%{release} | |
165 | ||
166 | %description gtk3 | |
167 | GTK+ 3.x bindings for libcanberra library. | |
168 | ||
169 | %description gtk3 -l pl.UTF-8 | |
170 | Wiązania GTK+ 3.x do biblioteki libcanberra. | |
171 | ||
172 | %package gtk3-devel | |
25f388d6 JB |
173 | Summary: Development files for libcanberra-gtk3 library |
174 | Summary(pl.UTF-8): Pliki programistyczne biblioteki libcanberra-gtk3 | |
2c60a8a7 AF |
175 | Group: X11/Development/Libraries |
176 | Requires: %{name}-devel = %{version}-%{release} | |
c29a5766 | 177 | Requires: %{name}-gtk-devel-common = %{version}-%{release} |
c23bab46 | 178 | Requires: %{name}-gtk3 = %{version}-%{release} |
64fdde46 | 179 | Requires: gtk+3-devel >= 3.0.0 |
2c60a8a7 AF |
180 | |
181 | %description gtk3-devel | |
25f388d6 | 182 | Development files for libcanberra-gtk3 library. |
2c60a8a7 AF |
183 | |
184 | %description gtk3-devel -l pl.UTF-8 | |
25f388d6 | 185 | Pliki programistyczne biblioteki libcanberra-gtk3. |
2c60a8a7 AF |
186 | |
187 | %package gtk3-static | |
188 | Summary: Static libcanberra-gtk3 library | |
189 | Summary(pl.UTF-8): Statyczna biblioteka libcanberra-gtk3 | |
190 | Group: X11/Development/Libraries | |
191 | Requires: %{name}-gtk3-devel = %{version}-%{release} | |
192 | ||
193 | %description gtk3-static | |
194 | Static libcanberra-gtk3 library. | |
195 | ||
196 | %description gtk3-static -l pl.UTF-8 | |
197 | Statyczna biblioteka libcanberra-gtk3. | |
198 | ||
d12b2a0d PZ |
199 | %package apidocs |
200 | Summary: libcanberra API documentation | |
201 | Summary(pl.UTF-8): Dokumentacja API libcanberra | |
202 | Group: Documentation | |
203 | Requires: gtk-doc-common | |
204 | ||
205 | %description apidocs | |
206 | libcanberra API documentation. | |
207 | ||
208 | %description apidocs -l pl.UTF-8 | |
209 | Dokumentacja API libcanberra. | |
210 | ||
b9f600fb MB |
211 | %package gnome |
212 | Summary: Files required to play login sound in GNOME | |
213 | Summary(pl.UTF-8): Pliki potrzebne do odtwarzania dźwięku logowania w GNOME | |
214 | Group: Applications | |
104ffcd1 | 215 | Requires(post,preun): GConf2 |
b9f600fb MB |
216 | Requires: %{name}-gtk = %{version}-%{release} |
217 | ||
218 | %description gnome | |
219 | Files required to play login sound in GNOME. | |
220 | ||
221 | %description gnome -l pl.UTF-8 | |
222 | Pliki potrzebne do odtwarzania dźwięku logowania w GNOME. | |
223 | ||
d12b2a0d PZ |
224 | %prep |
225 | %setup -q | |
226 | ||
227 | %build | |
80b0b6a0 | 228 | %{__gtkdocize} --docdir gtkdoc/ |
d12b2a0d | 229 | %{__libtoolize} |
ed9f9954 | 230 | %{__aclocal} -I m4 |
d12b2a0d | 231 | %{__autoconf} |
14347ec7 | 232 | %{__autoheader} |
d12b2a0d PZ |
233 | %{__automake} |
234 | %configure \ | |
4a15ba89 | 235 | --disable-silent-rules \ |
d12b2a0d | 236 | --enable-alsa \ |
1e3789d8 | 237 | --enable-gstreamer \ |
d12b2a0d | 238 | --enable-null \ |
1e3789d8 | 239 | --enable-oss \ |
9f640b01 | 240 | --enable-pulse \ |
104ffcd1 | 241 | --enable-static \ |
e1d2c227 | 242 | --enable-gtk-doc \ |
2c60a8a7 | 243 | %{__enable_disable gtk3} \ |
f61ee257 MB |
244 | --with-html-dir=%{_gtkdocdir} \ |
245 | --with-systemdsystemunitdir=%{systemdunitdir} | |
d12b2a0d PZ |
246 | %{__make} |
247 | ||
248 | %install | |
249 | rm -rf $RPM_BUILD_ROOT | |
14347ec7 | 250 | |
1279b8de | 251 | %{__make} -j1 install \ |
d12b2a0d PZ |
252 | DESTDIR=$RPM_BUILD_ROOT |
253 | ||
c29a5766 AF |
254 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/modules/*.{a,la} |
255 | %{__rm} $RPM_BUILD_ROOT%{backenddir}/*.{a,la} | |
256 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/doc/libcanberra/README | |
257 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
2c60a8a7 | 258 | %if %{with gtk3} |
c29a5766 | 259 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/modules/*.{a,la} |
2c60a8a7 | 260 | %endif |
d12b2a0d PZ |
261 | |
262 | %clean | |
263 | rm -rf $RPM_BUILD_ROOT | |
264 | ||
9f640b01 JB |
265 | %post -p /sbin/ldconfig |
266 | %postun -p /sbin/ldconfig | |
14347ec7 | 267 | |
9f640b01 JB |
268 | %post gtk -p /sbin/ldconfig |
269 | %postun gtk -p /sbin/ldconfig | |
14347ec7 | 270 | |
2c60a8a7 AF |
271 | %post gtk3 -p /sbin/ldconfig |
272 | %postun gtk3 -p /sbin/ldconfig | |
273 | ||
d12b2a0d PZ |
274 | %files |
275 | %defattr(644,root,root,755) | |
14347ec7 | 276 | %doc README |
c23bab46 | 277 | %attr(755,root,root) %{_bindir}/canberra-boot |
d12b2a0d PZ |
278 | %attr(755,root,root) %{_libdir}/libcanberra.so.*.*.* |
279 | %attr(755,root,root) %ghost %{_libdir}/libcanberra.so.0 | |
104ffcd1 MB |
280 | %dir %{backenddir} |
281 | %attr(755,root,root) %{backenddir}/libcanberra-alsa.so | |
282 | %attr(755,root,root) %{backenddir}/libcanberra-gstreamer.so | |
283 | %attr(755,root,root) %{backenddir}/libcanberra-oss.so | |
284 | %attr(755,root,root) %{backenddir}/libcanberra-pulse.so | |
285 | %attr(755,root,root) %{backenddir}/libcanberra-null.so | |
286 | %attr(755,root,root) %{backenddir}/libcanberra-multi.so | |
f61ee257 MB |
287 | %{systemdunitdir}/canberra-system-bootup.service |
288 | %{systemdunitdir}/canberra-system-shutdown-reboot.service | |
289 | %{systemdunitdir}/canberra-system-shutdown.service | |
14347ec7 MB |
290 | |
291 | %files devel | |
292 | %defattr(644,root,root,755) | |
293 | %attr(755,root,root) %{_libdir}/libcanberra.so | |
14347ec7 MB |
294 | %{_includedir}/canberra.h |
295 | %{_pkgconfigdir}/libcanberra.pc | |
296 | ||
297 | %files static | |
298 | %defattr(644,root,root,755) | |
299 | %{_libdir}/libcanberra.a | |
d12b2a0d | 300 | |
25f388d6 JB |
301 | %files -n vala-libcanberra |
302 | %defattr(644,root,root,755) | |
303 | %{_datadir}/vala/vapi/libcanberra.vapi | |
304 | ||
14347ec7 | 305 | %files gtk |
d12b2a0d | 306 | %defattr(644,root,root,755) |
2c60a8a7 | 307 | %if %{without gtk3} |
14347ec7 | 308 | %attr(755,root,root) %{_bindir}/canberra-gtk-play |
2c60a8a7 | 309 | %endif |
d12b2a0d PZ |
310 | %attr(755,root,root) %{_libdir}/libcanberra-gtk.so.*.*.* |
311 | %attr(755,root,root) %ghost %{_libdir}/libcanberra-gtk.so.0 | |
e25fd682 | 312 | %attr(755,root,root) %{_libdir}/gtk-2.0/modules/libcanberra-gtk-module.so |
d12b2a0d | 313 | |
25f388d6 JB |
314 | %files gtk-devel-common |
315 | %defattr(644,root,root,755) | |
316 | %{_includedir}/canberra-gtk.h | |
317 | ||
14347ec7 | 318 | %files gtk-devel |
d12b2a0d | 319 | %defattr(644,root,root,755) |
d12b2a0d | 320 | %attr(755,root,root) %{_libdir}/libcanberra-gtk.so |
d12b2a0d | 321 | %{_pkgconfigdir}/libcanberra-gtk.pc |
14347ec7 MB |
322 | |
323 | %files gtk-static | |
324 | %defattr(644,root,root,755) | |
325 | %{_libdir}/libcanberra-gtk.a | |
d12b2a0d | 326 | |
25f388d6 | 327 | %files -n vala-libcanberra-gtk |
c29a5766 | 328 | %defattr(644,root,root,755) |
c29a5766 AF |
329 | %{_datadir}/vala/vapi/libcanberra-gtk.vapi |
330 | ||
2c60a8a7 AF |
331 | %if %{with gtk3} |
332 | %files gtk3 | |
333 | %defattr(644,root,root,755) | |
334 | %attr(755,root,root) %{_bindir}/canberra-gtk-play | |
335 | %attr(755,root,root) %{_libdir}/libcanberra-gtk3.so.*.*.* | |
336 | %attr(755,root,root) %ghost %{_libdir}/libcanberra-gtk3.so.0 | |
337 | %attr(755,root,root) %{_libdir}/gtk-3.0/modules/libcanberra-gtk-module.so | |
338 | %attr(755,root,root) %{_libdir}/gtk-3.0/modules/libcanberra-gtk3-module.so | |
339 | ||
340 | %files gtk3-devel | |
341 | %defattr(644,root,root,755) | |
342 | %attr(755,root,root) %{_libdir}/libcanberra-gtk3.so | |
2c60a8a7 AF |
343 | %{_pkgconfigdir}/libcanberra-gtk3.pc |
344 | ||
345 | %files gtk3-static | |
346 | %defattr(644,root,root,755) | |
347 | %{_libdir}/libcanberra-gtk3.a | |
348 | %endif | |
349 | ||
d12b2a0d PZ |
350 | %files apidocs |
351 | %defattr(644,root,root,755) | |
352 | %{_gtkdocdir}/%{name} | |
b9f600fb MB |
353 | |
354 | %files gnome | |
355 | %defattr(644,root,root,755) | |
86b16b40 | 356 | %if %{with gnome2} |
d3bb00e1 | 357 | %{_datadir}/gdm/autostart/LoginWindow/libcanberra-ready-sound.desktop |
86b16b40 | 358 | %endif |
b9f600fb MB |
359 | %{_datadir}/gnome/autostart/libcanberra-login-sound.desktop |
360 | %attr(755,root,root) %{_datadir}/gnome/shutdown/libcanberra-logout-sound.sh | |
c23bab46 | 361 | %{_libdir}/gnome-settings-daemon-3.0/gtk-modules/canberra-gtk-module.desktop |