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