]> git.pld-linux.org Git - packages/OpenAL.git/blobdiff - OpenAL.spec
use different cmake flags to toggle sse
[packages/OpenAL.git] / OpenAL.spec
index 291c282c9ba5d96e68f0fca46674eaf66e4a4669..9f501d6854188f633da0cf0dade16d9b64e6a4ad 100644 (file)
@@ -1,47 +1,53 @@
 #
 # Conditional build:
-# _without_alsa                - without ALSA support
-# _without_doc         - don't build HTML documentation (from SGML source)
-# _with_mmx            - use MMX (won't run on non-MMX CPU)
+%bcond_without alsa            # ALSA backend
+%bcond_without jack            # JACK backend
+%bcond_without portaudio       # PortAudio backend
+%bcond_without pulseaudio      # PulseAudio backend
+%bcond_with    sdl             # SDL2 backend
+%bcond_with    sse             # force use of SSE instructions (x86)
+%bcond_with    sse2            # force use of SSE2 instructions (x86)
+%bcond_without gui             # alsoft-config GUI
+%bcond_with    qt4             # Qt 4 instead of Qt 5 for GUI
 #
-# TODO:
-# - remove zip bcond?
-# - check %{name}-acfix.patch if it's still nedded, sorry
-#   for the inconvenience, I'll do it if I can...
-#
-%ifarch athlon
-%define                _with_mmx       1
+%ifarch pentium3 pentium4
+%define        with_sse        1
 %endif
-%ifnarch i586 i686 athlon
-%define                _with_mmx       0
+%ifarch pentium4
+%define        with_sse2       1
 %endif
 Summary:       Open Audio Library
-Summary(pl):   Otwarta Biblioteka D¼wiêku
+Summary(pl.UTF-8):     Otwarta Biblioteka Dźwięku
 Name:          OpenAL
-Version:       0.0.6
-%define        snap    20030806
-Release:       1.%{snap}.0.9
-License:       LGPL
+Version:       1.20.0
+Release:       1
+License:       LGPL v2+
 Group:         Libraries
-# from CVS :pserver:guest@opensource.creative.com:/usr/local/cvs-repository /openal
-# (without all Win and Mac stuff and demos)
-Source0:       http://pb152.srem.sdi.tpnet.pl/pld/%{name}-linuxonly-%{snap}.tar.bz2
-# Source0-md5: 4a5202f6cba291ae0a9af59410bdda88
-Patch0:                %{name}-prefix.patch
-Patch1:                %{name}-acfix.patch
-Patch2:                %{name}-info.patch
-URL:           http://opensource.creative.com/
-BuildRequires: SDL-devel
-%{!?_without_alsa:BuildRequires:       alsa-lib-devel}
-BuildRequires: autoconf
-BuildRequires: automake
-%{!?_without_doc:BuildRequires:        docbook-utils}
-%{!?_without_doc:BuildRequires:        gnome-doc-tools}
-BuildRequires: libvorbis-devel
-%{?_with_mmx:BuildRequires:    nasm}
-BuildRequires: smpeg-devel
-BuildRequires: texinfo
-BuildRequires: zip
+Source0:       http://openal-soft.org/openal-releases/openal-soft-%{version}.tar.bz2
+# Source0-md5: f6349071db03e48994ea09daa031ef6e
+Patch0:                %{name}-pc.patch
+URL:           http://www.openal.org/
+%{?with_sdl:BuildRequires:     SDL2-devel >= 2}
+%{?with_alsa:BuildRequires:    alsa-lib-devel}
+BuildRequires: cmake >= 3.0.2
+%{?with_jack:BuildRequires:    jack-audio-connection-kit-devel}
+BuildRequires: libstdc++-devel >= 6:4.8.1
+BuildRequires: pkgconfig
+%{?with_portaudio:BuildRequires:       portaudio-devel}
+%{?with_pulseaudio:BuildRequires:      pulseaudio-devel}
+BuildRequires: rpmbuild(macros) >= 1.605
+%if %{with gui}
+%if %{with qt4}
+BuildRequires: QtCore-devel >= 4.8.0
+BuildRequires: QtGui-devel >= 4.8.0
+BuildRequires: qt4-build >= 4.8.0
+%else
+BuildRequires: Qt5Core-devel >= 5
+BuildRequires: Qt5Gui-devel >= 5
+BuildRequires: Qt5Widgets-devel >= 5
+BuildRequires: qt5-build >= 5
+%endif
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -52,77 +58,73 @@ developers and desktop users that rely on portable standards like
 OpenGL, for games and other multimedia applications. OpenAL is already
 supported by a number of hardware vendors and developers.
 
-%description -l pl
-OpenAL, otwarta biblioteka d¼wiêku, to po³±czony wysi³ek w celu
-stworzenia otwartego, niezale¿nego od producentów, miêdzyplatformowego
-interfejsu projektowania aplikacji w czê¶ci obs³ugi d¼wiêku.
-Biblioteka adresowana jest do twórców aplikacji i u¿ytkowników,
-którzy wybieraj± przeno¶ne standardy, jak OpenGL, w grach i
-aplikacjach multimedialnych. OpenAL posiada ju¿ wsparcie wielu
-dostarczycieli sprzêtu i programistów.
+%description -l pl.UTF-8
+OpenAL, otwarta biblioteka dźwięku, to połączony wysiłek w celu
+stworzenia otwartego, niezależnego od producentów, międzyplatformowego
+interfejsu projektowania aplikacji w części obsługi dźwięku.
+Biblioteka adresowana jest do twórców aplikacji i użytkowników,
+którzy wybierają przenośne standardy, jak OpenGL, w grach i
+aplikacjach multimedialnych. OpenAL posiada już wsparcie wielu
+dostarczycieli sprzętu i programistów.
 
 %package devel
 Summary:       Headers for OpenAL
-Summary(pl):   Pliki nag³ówkowe do OpenAL
+Summary(pl.UTF-8):     Pliki nagłówkowe do OpenAL
 Group:         Development/Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Header files for OpenAL-based programs.
 
-%description devel -l pl
-Pliki nag³ówkowe potrzebne przy budowaniu programów opartych na
+%description devel -l pl.UTF-8
+Pliki nagłówkowe potrzebne przy budowaniu programów opartych na
 OpenAL.
 
-%package static
-Summary:       OpenAL static library
-Summary(pl):   Statyczna biblioteka OpenAL
-Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}
+%package gui
+Summary:       OpenAL configuration GUI
+Summary(pl.UTF-8):     Graficzny interfejs do konfiguracji biblioteki OpenAL
+Group:         X11/Applications/Sound
+Requires:      %{name} = %{version}-%{release}
+Requires:      QtCore >= 4.8.0
+Requires:      QtGui >= 4.8.0
 
-%description static
-OpenAL static library.
+%description gui
+OpenAL configuration GUI.
 
-%description static -l pl
-Biblioteka OpenAL do statycznego linkowania.
+%description gui -l pl.UTF-8
+Graficzny interfejs do konfiguracji biblioteki OpenAL.
 
 %prep
-%setup -q -n openal
+%setup -q -n openal-soft-%{version}
 %patch0 -p1
-#%%patch1 -p1
-%patch2 -p1
-
-echo 'AC_DEFUN([AC_HAS_MMX],[$%{?_with_mmx:1}%{!?_with_mmx:2}])' >> linux/acinclude.m4
 
 %build
-cd linux
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%configure \
-       %{!?debug:--enable-optimization} \
-       %{?_with_mmx:--enable-arch-asm} \
-       %{!?_without_alsa:--enable-alsa} \
-       --enable-sdl \
-       --enable-vorbis \
-       --enable-smpeg \
-       --enable-capture \
-       --with-gcc=%{__cc}                          
+cd build
+%cmake .. \
+       %{!?with_alsa:-DALSOFT_BACKEND_ALSA=OFF} \
+       %{!?with_jack:-DALSOFT_BACKEND_JACK=OFF} \
+       %{!?with_portaudio:-DALSOFT_BACKEND_PORTAUDIO=OFF} \
+       %{!?with_pulseaudio:-DALSOFT_BACKEND_PULSEAUDIO=OFF} \
+       %{?with_sdl:-DALSOFT_BACKEND_SDL2=ON} \
+       %{!?with_sse:-DALSOFT_CPUEXT_SSE=OFF} \
+       %{!?with_sse2:-DALSOFT_CPUEXT_SSE2=OFF} \
+       -DALSOFT_EXAMPLES=OFF \
+       %{!?with_gui:-DALSOFT_NO_CONFIG_UTIL=ON} \
+       %{?with_qt4:-DALSOFT_NO_QT5=ON} \
 
 %{__make}
 
-cd ../docs
-%{!?_without_doc:%{__make} full-html}
-
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_infodir}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/openal
 
-cd linux
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install doc/openal.info $RPM_BUILD_ROOT%{_infodir}
+install -p alsoftrc.sample $RPM_BUILD_ROOT%{_sysconfdir}/openal/alsoft.conf
+
+# these look not really useful
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/altonegen
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -130,24 +132,24 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
-%post devel
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-
-%postun        devel
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-
 %files
 %defattr(644,root,root,755)
-%doc linux/{CREDITS,ChangeLog,NOTES,TODO}
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openal
+%attr(755,root,root) %{_bindir}/makemhr
+%attr(755,root,root) %{_bindir}/openal-info
+%attr(755,root,root) %{_libdir}/libopenal.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libopenal.so.1
+%{_datadir}/openal
 
 %files devel
 %defattr(644,root,root,755)
-%doc linux/doc/LOKI* %{!?_without_doc:docs/oalspecs-full}
-%attr(755,root,root) %{_libdir}/lib*.so
+%attr(755,root,root) %{_libdir}/libopenal.so
 %{_includedir}/AL
-%{_infodir}/openal.info*
+%{_pkgconfigdir}/openal.pc
+%{_libdir}/cmake/OpenAL
 
-%files static
+%if %{with gui}
+%files gui
 %defattr(644,root,root,755)
-%attr(755,root,root)%{_libdir}/*.a
+%attr(755,root,root) %{_bindir}/alsoft-config
+%endif
This page took 0.054211 seconds and 4 git commands to generate.