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