source: spec/trunk/SPECS/sdl_sound.spec@ 1330

Last change on this file since 1330 was 713, checked in by valerius, 10 years ago

spec: sdl_sound: Add .spec file for sdl_sound.

File size: 5.1 KB
Line 
1%define svn_url http://svn.netlabs.org/repos/ports/sdl_sound/trunk
2%define svn_rev 1445
3
4Name: sdl_sound
5Version: 1.0.3
6Release: 1%{?dist}
7%define lib_name %name
8
9Summary: An abstract soundfile decoder
10License: LGPL
11Group: System/Libraries
12URL: http://icculus.org/SDL_sound/
13
14Packager: Slava Dubrovskiy <dubrsl@altlinux.ru>
15
16Source: %{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
23BuildRequires: sdl-devel libmikmod-devel libogg-devel libsmpeg-devel libvorbis-devel libflac-devel
24
25%description
26SDL_sound is a library that handles the decoding of several popular sound file
27formats, such as .WAV and .MP3. It is meant to make the programmer's sound
28playback tasks simpler. The programmer gives SDL_sound a filename, or feeds
29it data directly from one of many sources, and then reads the decoded
30waveform data back at her leisure. If resource constraints are a concern,
31SDL_sound can process sound data in programmer-specified blocks. Alternately,
32SDL_sound can decode a whole sound file and hand back a single pointer to the
33whole waveform. SDL_sound can also handle sample rate, audio format, and
34channel conversion on-the-fly and behind-the-scenes, if the programmer desires.
35
36%package devel
37Summary: Header files and more to develop SDL_sound applications
38Group: Development/C
39Requires: %{lib_name} = %{version}-%{release}
40
41%description devel
42SDL_sound is a library that handles the decoding of several popular sound file
43formats, such as .WAV and .MP3. It is meant to make the programmer's sound
44playback tasks simpler. The programmer gives SDL_sound a filename, or feeds
45it data directly from one of many sources, and then reads the decoded
46waveform data back at her leisure. If resource constraints are a concern,
47SDL_sound can process sound data in programmer-specified blocks. Alternately,
48SDL_sound can decode a whole sound file and hand back a single pointer to the
49whole waveform. SDL_sound can also handle sample rate, audio format, and
50channel 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
59svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
60rm -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
66bootstrap
67
68%build
69export 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
85emximp -o %{buildroot}%{_libdir}/SDL_sound_dll.lib %{buildroot}%{_libdir}/SDL_s101.dll
86emximp -o %{buildroot}%{_libdir}/SDL_sound101_dll.lib %{buildroot}%{_libdir}/SDL_s101.dll
87
88# create forwarder
89cat << EOF >%{buildroot}%{_libdir}/sdlsound.def
90LIBRARY SDLsound
91DESCRIPTION '@#libsdl org:1.2.15#@##1## 2016-03-16 dtp::::::@@SDL_sound (alternative port) forwarder'
92IMPORTS
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
109EXPORTS
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
126EOF
127echo "">%{buildroot}%{_libdir}/dummy.c
128gcc -Zomf -o %{buildroot}%{_libdir}/dummy.o -c %{buildroot}%{_libdir}/dummy.c
129gcc -Zomf -Zdll -o %{buildroot}%{_libdir}/SDLsound.dll \
130 %{buildroot}%{_libdir}/sdlsound.def %{buildroot}%{_libdir}/dummy.o
131rm -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
Note: See TracBrowser for help on using the repository browser.