]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without alsa # ALSA backend | |
4 | %bcond_without jack # JACK backend | |
5 | %bcond_without pipewire # PipeWire backend | |
6 | %bcond_without portaudio # PortAudio backend | |
7 | %bcond_without pulseaudio # PulseAudio backend | |
8 | %bcond_without rtkit # RTKit support | |
9 | %bcond_with sdl # SDL2 backend | |
10 | %bcond_with sse2 # force use of SSE2 instructions (x86) | |
11 | %bcond_without gui # alsoft-config GUI | |
12 | ||
13 | %ifarch pentium4 x32 %{x8664} | |
14 | %define with_sse2 1 | |
15 | %endif | |
16 | Summary: Open Audio Library | |
17 | Summary(pl.UTF-8): Otwarta Biblioteka Dźwięku | |
18 | Name: OpenAL | |
19 | Version: 1.23.1 | |
20 | Release: 1 | |
21 | License: LGPL v2+ | |
22 | Group: Libraries | |
23 | Source0: https://openal-soft.org/openal-releases/openal-soft-%{version}.tar.bz2 | |
24 | # Source0-md5: 58a73698288d2787451b61f8f4431513 | |
25 | Patch0: %{name}-nosse.patch | |
26 | URL: http://www.openal.org/ | |
27 | %{?with_sdl:BuildRequires: SDL2-devel >= 2} | |
28 | %{?with_alsa:BuildRequires: alsa-lib-devel} | |
29 | BuildRequires: cmake >= 3.0.2 | |
30 | %{?with_rtkit:BuildRequires: dbus-devel} | |
31 | %{?with_jack:BuildRequires: jack-audio-connection-kit-devel} | |
32 | BuildRequires: libmysofa-devel | |
33 | BuildRequires: libstdc++-devel >= 6:5 | |
34 | %{?with_pipewire:BuildRequires: pipewire-devel >= 0.3.23} | |
35 | BuildRequires: pkgconfig | |
36 | %{?with_portaudio:BuildRequires: portaudio-devel} | |
37 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel} | |
38 | BuildRequires: rpmbuild(macros) >= 1.742 | |
39 | %if %{with gui} | |
40 | BuildRequires: Qt5Core-devel >= 5 | |
41 | BuildRequires: Qt5Gui-devel >= 5 | |
42 | BuildRequires: Qt5Widgets-devel >= 5 | |
43 | BuildRequires: qt5-build >= 5 | |
44 | %endif | |
45 | %{?with_sse2:Requires: cpuinfo(sse2)} | |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | OpenAL, the Open Audio Library, is a joint effort to create an open, | |
50 | vendor-neutral, cross-platform API for interactive, primarily | |
51 | spatialized audio. OpenAL's primary audience are application | |
52 | developers and desktop users that rely on portable standards like | |
53 | OpenGL, for games and other multimedia applications. OpenAL is already | |
54 | supported by a number of hardware vendors and developers. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | OpenAL, otwarta biblioteka dźwięku, to połączony wysiłek w celu | |
58 | stworzenia otwartego, niezależnego od producentów, międzyplatformowego | |
59 | interfejsu projektowania aplikacji w części obsługi dźwięku. | |
60 | Biblioteka adresowana jest do twórców aplikacji i użytkowników, | |
61 | którzy wybierają przenośne standardy, jak OpenGL, w grach i | |
62 | aplikacjach multimedialnych. OpenAL posiada już wsparcie wielu | |
63 | dostarczycieli sprzętu i programistów. | |
64 | ||
65 | %package devel | |
66 | Summary: Headers for OpenAL | |
67 | Summary(pl.UTF-8): Pliki nagłówkowe do OpenAL | |
68 | Group: Development/Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
70 | ||
71 | %description devel | |
72 | Header files for OpenAL-based programs. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki nagłówkowe potrzebne przy budowaniu programów opartych na | |
76 | OpenAL. | |
77 | ||
78 | %package gui | |
79 | Summary: OpenAL configuration GUI | |
80 | Summary(pl.UTF-8): Graficzny interfejs do konfiguracji biblioteki OpenAL | |
81 | Group: X11/Applications/Sound | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Requires: Qt5Core >= 5 | |
84 | Requires: Qt5Gui >= 5 | |
85 | Requires: Qt5Widgets >= 5 | |
86 | ||
87 | %description gui | |
88 | OpenAL configuration GUI. | |
89 | ||
90 | %description gui -l pl.UTF-8 | |
91 | Graficzny interfejs do konfiguracji biblioteki OpenAL. | |
92 | ||
93 | %prep | |
94 | %setup -q -n openal-soft-%{version} | |
95 | %patch0 -p1 | |
96 | ||
97 | %build | |
98 | cd build | |
99 | %cmake .. \ | |
100 | %{!?with_alsa:-DALSOFT_BACKEND_ALSA=OFF} \ | |
101 | %{!?with_jack:-DALSOFT_BACKEND_JACK=OFF} \ | |
102 | %{cmake_on_off pipewire ALSOFT_BACKEND_PIPEWIRE} \ | |
103 | %{!?with_portaudio:-DALSOFT_BACKEND_PORTAUDIO=OFF} \ | |
104 | %{!?with_pulseaudio:-DALSOFT_BACKEND_PULSEAUDIO=OFF} \ | |
105 | %{cmake_on_off rtkit ALSOFT_RTKIT} \ | |
106 | %{?with_sdl:-DALSOFT_BACKEND_SDL2=ON} \ | |
107 | %{!?with_sse2:-DALSOFT_ENABLE_SSE2_CODEGEN=OFF} \ | |
108 | -DALSOFT_EXAMPLES=OFF \ | |
109 | %{!?with_gui:-DALSOFT_NO_CONFIG_UTIL=ON} \ | |
110 | ||
111 | %{__make} | |
112 | ||
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/openal | |
116 | ||
117 | %{__make} -C build install \ | |
118 | DESTDIR=$RPM_BUILD_ROOT | |
119 | ||
120 | install -p alsoftrc.sample $RPM_BUILD_ROOT%{_sysconfdir}/openal/alsoft.conf | |
121 | ||
122 | %clean | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %post -p /sbin/ldconfig | |
126 | %postun -p /sbin/ldconfig | |
127 | ||
128 | %files | |
129 | %defattr(644,root,root,755) | |
130 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openal | |
131 | %attr(755,root,root) %{_bindir}/makemhr | |
132 | %attr(755,root,root) %{_bindir}/openal-info | |
133 | %attr(755,root,root) %{_libdir}/libopenal.so.*.*.* | |
134 | %attr(755,root,root) %ghost %{_libdir}/libopenal.so.1 | |
135 | %{_datadir}/openal | |
136 | ||
137 | %files devel | |
138 | %defattr(644,root,root,755) | |
139 | %attr(755,root,root) %{_libdir}/libopenal.so | |
140 | %{_includedir}/AL | |
141 | %{_pkgconfigdir}/openal.pc | |
142 | %{_libdir}/cmake/OpenAL | |
143 | ||
144 | %if %{with gui} | |
145 | %files gui | |
146 | %defattr(644,root,root,755) | |
147 | %attr(755,root,root) %{_bindir}/alsoft-config | |
148 | %endif |