| 1 | %define svn_url http://svn.netlabs.org/repos/ports/sdl_sound/trunk
|
|---|
| 2 | %define svn_rev 1445
|
|---|
| 3 |
|
|---|
| 4 | Name: sdl_sound
|
|---|
| 5 | Version: 1.0.3
|
|---|
| 6 | Release: 1%{?dist}
|
|---|
| 7 | %define lib_name %name
|
|---|
| 8 |
|
|---|
| 9 | Summary: An abstract soundfile decoder
|
|---|
| 10 | License: LGPL
|
|---|
| 11 | Group: System/Libraries
|
|---|
| 12 | URL: http://icculus.org/SDL_sound/
|
|---|
| 13 |
|
|---|
| 14 | Packager: Slava Dubrovskiy <dubrsl@altlinux.ru>
|
|---|
| 15 |
|
|---|
| 16 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 17 |
|
|---|
| 18 | #BuildRequires: doxygen
|
|---|
| 19 | #BuildRequires: libspeex-devel
|
|---|
| 20 | #BuildRequires: libmodplug-devel
|
|---|
| 21 |
|
|---|
| 22 | # Automatically added by buildreq on Fri Feb 17 2006
|
|---|
| 23 | BuildRequires: sdl-devel libmikmod-devel libogg-devel libsmpeg-devel libvorbis-devel libflac-devel
|
|---|
| 24 |
|
|---|
| 25 | %description
|
|---|
| 26 | SDL_sound is a library that handles the decoding of several popular sound file
|
|---|
| 27 | formats, such as .WAV and .MP3. It is meant to make the programmer's sound
|
|---|
| 28 | playback tasks simpler. The programmer gives SDL_sound a filename, or feeds
|
|---|
| 29 | it data directly from one of many sources, and then reads the decoded
|
|---|
| 30 | waveform data back at her leisure. If resource constraints are a concern,
|
|---|
| 31 | SDL_sound can process sound data in programmer-specified blocks. Alternately,
|
|---|
| 32 | SDL_sound can decode a whole sound file and hand back a single pointer to the
|
|---|
| 33 | whole waveform. SDL_sound can also handle sample rate, audio format, and
|
|---|
| 34 | channel conversion on-the-fly and behind-the-scenes, if the programmer desires.
|
|---|
| 35 |
|
|---|
| 36 | %package devel
|
|---|
| 37 | Summary: Header files and more to develop SDL_sound applications
|
|---|
| 38 | Group: Development/C
|
|---|
| 39 | Requires: %{lib_name} = %{version}-%{release}
|
|---|
| 40 |
|
|---|
| 41 | %description devel
|
|---|
| 42 | SDL_sound is a library that handles the decoding of several popular sound file
|
|---|
| 43 | formats, such as .WAV and .MP3. It is meant to make the programmer's sound
|
|---|
| 44 | playback tasks simpler. The programmer gives SDL_sound a filename, or feeds
|
|---|
| 45 | it data directly from one of many sources, and then reads the decoded
|
|---|
| 46 | waveform data back at her leisure. If resource constraints are a concern,
|
|---|
| 47 | SDL_sound can process sound data in programmer-specified blocks. Alternately,
|
|---|
| 48 | SDL_sound can decode a whole sound file and hand back a single pointer to the
|
|---|
| 49 | whole waveform. SDL_sound can also handle sample rate, audio format, and
|
|---|
| 50 | channel conversion on-the-fly and behind-the-scenes, if the programmer desires.
|
|---|
| 51 |
|
|---|
| 52 | %debug_package
|
|---|
| 53 |
|
|---|
| 54 | %prep
|
|---|
| 55 | %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}
|
|---|
| 56 | %setup -q
|
|---|
| 57 | %else
|
|---|
| 58 | %setup -q -n "%{name}-%{version}" -Tc
|
|---|
| 59 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 60 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 61 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 62 | %endif
|
|---|
| 63 |
|
|---|
| 64 | #%patch0 -p1
|
|---|
| 65 |
|
|---|
| 66 | bootstrap
|
|---|
| 67 |
|
|---|
| 68 | %build
|
|---|
| 69 | export CFLAGS="-g -DBUILD_SDL -DSDLCALL=_System -I/@unixroot/usr/include/smpeg" LDFLAGS="-g -Zhigh-mem"
|
|---|
| 70 |
|
|---|
| 71 | %configure \
|
|---|
| 72 | --disable-static \
|
|---|
| 73 | --disable-sdltest
|
|---|
| 74 |
|
|---|
| 75 | %{__make} %{?_smp_mflags}
|
|---|
| 76 |
|
|---|
| 77 | %install
|
|---|
| 78 | %makeinstall
|
|---|
| 79 | #%{__mkdir_p} %{buildroot}%{_mandir}/man3
|
|---|
| 80 | #%{__install} -pD docs/man/man3/* %{buildroot}%{_mandir}/man3/
|
|---|
| 81 | # Del for fix #10696
|
|---|
| 82 | #%{__rm} -f %{buildroot}%{_mandir}/man3/buffer.*
|
|---|
| 83 |
|
|---|
| 84 | # create import libs
|
|---|
| 85 | emximp -o %{buildroot}%{_libdir}/SDL_sound_dll.lib %{buildroot}%{_libdir}/SDL_s101.dll
|
|---|
| 86 | emximp -o %{buildroot}%{_libdir}/SDL_sound101_dll.lib %{buildroot}%{_libdir}/SDL_s101.dll
|
|---|
| 87 |
|
|---|
| 88 | # create forwarder
|
|---|
| 89 | cat << EOF >%{buildroot}%{_libdir}/sdlsound.def
|
|---|
| 90 | LIBRARY SDLsound
|
|---|
| 91 | DESCRIPTION '@#libsdl org:1.2.15#@##1## 2016-03-16 dtp::::::@@SDL_sound (alternative port) forwarder'
|
|---|
| 92 | IMPORTS
|
|---|
| 93 | Sound_ConvertAudio=SDL_s101.Sound_ConvertAudio
|
|---|
| 94 | Sound_BuildAudioCVT=SDL_s101.Sound_BuildAudioCVT
|
|---|
| 95 | Sound_GetLinkedVersion=SDL_s101.Sound_GetLinkedVersion
|
|---|
| 96 | Sound_Init=SDL_s101.Sound_Init
|
|---|
| 97 | Sound_Quit=SDL_s101.Sound_Quit
|
|---|
| 98 | Sound_AvailableDecoders=SDL_s101.Sound_AvailableDecoders
|
|---|
| 99 | Sound_GetError=SDL_s101.Sound_GetError
|
|---|
| 100 | Sound_ClearError=SDL_s101.Sound_ClearError
|
|---|
| 101 | Sound_NewSample=SDL_s101.Sound_NewSample
|
|---|
| 102 | Sound_NewSampleFromFile=SDL_s101.Sound_NewSampleFromFile
|
|---|
| 103 | Sound_FreeSample=SDL_s101.Sound_FreeSample
|
|---|
| 104 | Sound_SetBufferSize=SDL_s101.Sound_SetBufferSize
|
|---|
| 105 | Sound_Decode=SDL_s101.Sound_Decode
|
|---|
| 106 | Sound_DecodeAll=SDL_s101.Sound_DecodeAll
|
|---|
| 107 | Sound_Rewind=SDL_s101.Sound_Rewind
|
|---|
| 108 | Sound_Seek=SDL_s101.Sound_Seek
|
|---|
| 109 | EXPORTS
|
|---|
| 110 | Sound_ConvertAudio
|
|---|
| 111 | Sound_BuildAudioCVT
|
|---|
| 112 | Sound_GetLinkedVersion
|
|---|
| 113 | Sound_Init
|
|---|
| 114 | Sound_Quit
|
|---|
| 115 | Sound_AvailableDecoders
|
|---|
| 116 | Sound_GetError
|
|---|
| 117 | Sound_ClearError
|
|---|
| 118 | Sound_NewSample
|
|---|
| 119 | Sound_NewSampleFromFile
|
|---|
| 120 | Sound_FreeSample
|
|---|
| 121 | Sound_SetBufferSize
|
|---|
| 122 | Sound_Decode
|
|---|
| 123 | Sound_DecodeAll
|
|---|
| 124 | Sound_Rewind
|
|---|
| 125 | Sound_Seek
|
|---|
| 126 | EOF
|
|---|
| 127 | echo "">%{buildroot}%{_libdir}/dummy.c
|
|---|
| 128 | gcc -Zomf -o %{buildroot}%{_libdir}/dummy.o -c %{buildroot}%{_libdir}/dummy.c
|
|---|
| 129 | gcc -Zomf -Zdll -o %{buildroot}%{_libdir}/SDLsound.dll \
|
|---|
| 130 | %{buildroot}%{_libdir}/sdlsound.def %{buildroot}%{_libdir}/dummy.o
|
|---|
| 131 | rm -rf %{buildroot}%{_libdir}/dummy.* %{buildroot}%{_libdir}/sdlsound.def
|
|---|
| 132 |
|
|---|
| 133 | %files
|
|---|
| 134 | #%doc README
|
|---|
| 135 | %{_bindir}/*
|
|---|
| 136 | %{_libdir}/*.dll
|
|---|
| 137 |
|
|---|
| 138 | %files devel
|
|---|
| 139 | %doc CREDITS TODO CHANGELOG COPYING
|
|---|
| 140 | #%doc docs/html
|
|---|
| 141 | %{_libdir}/*.a
|
|---|
| 142 | %{_libdir}/*.lib
|
|---|
| 143 | %exclude %{_libdir}/lib*.la*
|
|---|
| 144 | %{_includedir}/*
|
|---|
| 145 | #%{_mandir}/man3/*
|
|---|
| 146 |
|
|---|
| 147 | %changelog
|
|---|
| 148 | * Wed Mar 16 2016 Valery V.Sedletski <_valerius@mail.ru> - 1.0.3-1
|
|---|
| 149 | - Initial OS/2 packaging
|
|---|