%define svn_url http://svn.netlabs.org/repos/ports/sdl_sound/trunk %define svn_rev 1445 Name: sdl_sound Version: 1.0.3 Release: 1%{?dist} %define lib_name %name Summary: An abstract soundfile decoder License: LGPL Group: System/Libraries URL: http://icculus.org/SDL_sound/ Packager: Slava Dubrovskiy Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip #BuildRequires: doxygen #BuildRequires: libspeex-devel #BuildRequires: libmodplug-devel # Automatically added by buildreq on Fri Feb 17 2006 BuildRequires: sdl-devel libmikmod-devel libogg-devel libsmpeg-devel libvorbis-devel libflac-devel %description SDL_sound is a library that handles the decoding of several popular sound file formats, such as .WAV and .MP3. It is meant to make the programmer's sound playback tasks simpler. The programmer gives SDL_sound a filename, or feeds it data directly from one of many sources, and then reads the decoded waveform data back at her leisure. If resource constraints are a concern, SDL_sound can process sound data in programmer-specified blocks. Alternately, SDL_sound can decode a whole sound file and hand back a single pointer to the whole waveform. SDL_sound can also handle sample rate, audio format, and channel conversion on-the-fly and behind-the-scenes, if the programmer desires. %package devel Summary: Header files and more to develop SDL_sound applications Group: Development/C Requires: %{lib_name} = %{version}-%{release} %description devel SDL_sound is a library that handles the decoding of several popular sound file formats, such as .WAV and .MP3. It is meant to make the programmer's sound playback tasks simpler. The programmer gives SDL_sound a filename, or feeds it data directly from one of many sources, and then reads the decoded waveform data back at her leisure. If resource constraints are a concern, SDL_sound can process sound data in programmer-specified blocks. Alternately, SDL_sound can decode a whole sound file and hand back a single pointer to the whole waveform. SDL_sound can also handle sample rate, audio format, and channel conversion on-the-fly and behind-the-scenes, if the programmer desires. %debug_package %prep %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} %setup -q %else %setup -q -n "%{name}-%{version}" -Tc svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") %endif #%patch0 -p1 bootstrap %build export CFLAGS="-g -DBUILD_SDL -DSDLCALL=_System -I/@unixroot/usr/include/smpeg" LDFLAGS="-g -Zhigh-mem" %configure \ --disable-static \ --disable-sdltest %{__make} %{?_smp_mflags} %install %makeinstall #%{__mkdir_p} %{buildroot}%{_mandir}/man3 #%{__install} -pD docs/man/man3/* %{buildroot}%{_mandir}/man3/ # Del for fix #10696 #%{__rm} -f %{buildroot}%{_mandir}/man3/buffer.* # create import libs emximp -o %{buildroot}%{_libdir}/SDL_sound_dll.lib %{buildroot}%{_libdir}/SDL_s101.dll emximp -o %{buildroot}%{_libdir}/SDL_sound101_dll.lib %{buildroot}%{_libdir}/SDL_s101.dll # create forwarder cat << EOF >%{buildroot}%{_libdir}/sdlsound.def LIBRARY SDLsound DESCRIPTION '@#libsdl org:1.2.15#@##1## 2016-03-16 dtp::::::@@SDL_sound (alternative port) forwarder' IMPORTS Sound_ConvertAudio=SDL_s101.Sound_ConvertAudio Sound_BuildAudioCVT=SDL_s101.Sound_BuildAudioCVT Sound_GetLinkedVersion=SDL_s101.Sound_GetLinkedVersion Sound_Init=SDL_s101.Sound_Init Sound_Quit=SDL_s101.Sound_Quit Sound_AvailableDecoders=SDL_s101.Sound_AvailableDecoders Sound_GetError=SDL_s101.Sound_GetError Sound_ClearError=SDL_s101.Sound_ClearError Sound_NewSample=SDL_s101.Sound_NewSample Sound_NewSampleFromFile=SDL_s101.Sound_NewSampleFromFile Sound_FreeSample=SDL_s101.Sound_FreeSample Sound_SetBufferSize=SDL_s101.Sound_SetBufferSize Sound_Decode=SDL_s101.Sound_Decode Sound_DecodeAll=SDL_s101.Sound_DecodeAll Sound_Rewind=SDL_s101.Sound_Rewind Sound_Seek=SDL_s101.Sound_Seek EXPORTS Sound_ConvertAudio Sound_BuildAudioCVT Sound_GetLinkedVersion Sound_Init Sound_Quit Sound_AvailableDecoders Sound_GetError Sound_ClearError Sound_NewSample Sound_NewSampleFromFile Sound_FreeSample Sound_SetBufferSize Sound_Decode Sound_DecodeAll Sound_Rewind Sound_Seek EOF echo "">%{buildroot}%{_libdir}/dummy.c gcc -Zomf -o %{buildroot}%{_libdir}/dummy.o -c %{buildroot}%{_libdir}/dummy.c gcc -Zomf -Zdll -o %{buildroot}%{_libdir}/SDLsound.dll \ %{buildroot}%{_libdir}/sdlsound.def %{buildroot}%{_libdir}/dummy.o rm -rf %{buildroot}%{_libdir}/dummy.* %{buildroot}%{_libdir}/sdlsound.def %files #%doc README %{_bindir}/* %{_libdir}/*.dll %files devel %doc CREDITS TODO CHANGELOG COPYING #%doc docs/html %{_libdir}/*.a %{_libdir}/*.lib %exclude %{_libdir}/lib*.la* %{_includedir}/* #%{_mandir}/man3/* %changelog * Wed Mar 16 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.0.3-1 - Initial OS/2 packaging