1
0
forked from pool/SDL_mixer
SDL_mixer/SDL_mixer.spec
Matthias Mailänder 19dc307ec7 Accepting request 208073 from home:bmwiedemann:branches:games
- import patches from upstream (via archlinux)
  to fix mixer / mikmod free corruption (bnc#851996)

OBS-URL: https://build.opensuse.org/request/show/208073
OBS-URL: https://build.opensuse.org/package/show/games/SDL_mixer?expand=0&rev=27
2013-11-23 19:39:49 +00:00

120 lines
3.7 KiB
RPMSpec

#
# spec file for package SDL_mixer
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: SDL_mixer
%define lname libSDL_mixer-1_2-0
Summary: Sample Mixer Library for SDL
License: Zlib
Group: Development/Libraries/C and C++
Version: 1.2.12
Release: 0
Url: http://libsdl.org/projects/SDL_mixer/release-1.2.html
Source: http://libsdl.org/projects/SDL_mixer/release/%name-%version.tar.gz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM: http://hg.libsdl.org/SDL_mixer/rev/56cad6484b04
Patch1: mikmod1.patch
# PATCH-FIX-UPSTREAM: http://hg.libsdl.org/SDL_mixer/rev/2ebb0d016f27
Patch2: mikmod2.patch
# PATCH-FIX-UPSTREAM: http://hg.libsdl.org/SDL_mixer/rev/2d713670db9b
Patch3: double-free-crash.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: flac-devel
BuildRequires: fluidsynth-devel
BuildRequires: libSDL-devel
BuildRequires: libmikmod-devel
BuildRequires: libvorbis-devel
BuildRequires: pkgconfig
%description
A multichannel audio mixer. It supports four channels of 16-bit stereo
audio, plus a single channel of music, mixed by the popular MikMod MOD,
Timidity MIDI, and SMPEG MP3 libraries.
%package -n %lname
Summary: Sample Mixer Library for SDL
Group: System/Libraries
Provides: SDL_mixer = %{version}
Obsoletes: SDL_mixer < %{version}
# bug437293
%ifarch ppc64
Obsoletes: SDL_mixer-64bit
%endif
%description -n %lname
A multichannel audio mixer. It supports four channels of 16-bit stereo
audio, plus a single channel of music, mixed by the popular MikMod MOD,
Timidity MIDI, and SMPEG MP3 libraries.
%package -n libSDL_mixer-devel
Requires: SDL-devel
Summary: Sample Mixer Library for SDL - files mandatory for development
Group: Development/Libraries/C and C++
Requires: %lname = %{version}
Requires: libSDL-devel
Provides: SDL_mixer-devel = %{version}
Obsoletes: SDL_mixer-devel < %{version}
# bug437293
%ifarch ppc64
Obsoletes: SDL_mixer-devel-64bit
%endif
%description -n libSDL_mixer-devel
A multi-channel audio mixer. It supports 4 channels of 16-bit stereo
audio, plus a single channel of music, mixed by the popular MikMod MOD,
Timidity MIDI, and SMPEG MP3 libraries.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
# remove unneccessary files from upstream tarball [bnc#508180] to clean up source RPM
rm libmikmod-3.1.12.zip
rm Watcom-OS2.zip
rm -rf VisualC
rm -rf Xcode
rm -rf Xcode-iOS
%build
%configure --disable-music-mod-shared --disable-music-ogg-shared --disable-music-flac-shared \
--disable-static --with-pic
make %{?_smp_mflags}
%install
make install install-bin DESTDIR=$RPM_BUILD_ROOT
rm -f %{buildroot}%{_libdir}/*.la
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%doc README CHANGES COPYING
%{_libdir}/libSDL_mixer-1*.so.*
%files -n libSDL_mixer-devel
%defattr(-,root,root)
%{_bindir}/play*
%{_includedir}/SDL/
%{_libdir}/libSDL_mixer.so
%{_libdir}/pkgconfig/SDL_mixer.pc
%changelog