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