SDL2_sound/sdl2_sound.spec

89 lines
2.5 KiB
RPMSpec
Raw Permalink Normal View History

2022-04-22 14:55:42 +03:00
%define major 2
%define libname %mklibname %{name} %{major}
%define develname %mklibname -d %{name}
%define oname SDL_sound
2021-01-16 00:05:49 +01:00
2022-04-22 14:55:42 +03:00
Summary: An abstract SDL2 sound-file decoder
Name: sdl2_sound
2021-01-16 00:05:49 +01:00
# see cmake file
#set(SDLSOUND_VERSION 2.0.0)
2022-04-22 14:55:42 +03:00
Version: 2.0.1
Release: 2
2022-04-22 14:55:42 +03:00
License: zlib
Group: System/Libraries
Url: https://hg.icculus.org/icculus/SDL_sound/
Source0: https://github.com/icculus/SDL_sound/archive/v%{version}.tar.gz?/%{oname}-%{version}.tar.gz
Patch0: sdl2_sound-sdl2-path.patch
BuildRequires: cmake
BuildRequires: physfs-devel
BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(libmikmod)
BuildRequires: pkgconfig(libmodplug)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(vorbis)
2021-01-16 00:05:49 +01:00
%description
SDL2_sound is SDL_sound but with a SDL2 backend. This 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 SDL2_sound a file-name, 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, SDL2_sound can process sound data in programmer-specified
blocks. Alternately, SDL2_sound can decode a whole sound file and hand
back a single pointer to the whole waveform. SDL2_sound can also handle
sample rate, audio format, and channel conversion on-the-fly and
behind-the-scenes.
%files
2022-04-22 14:55:42 +03:00
%doc docs/CREDITS.txt
%license LICENSE.txt
2021-01-16 00:05:49 +01:00
%{_bindir}/*
2022-04-22 14:55:42 +03:00
2021-01-16 00:05:49 +01:00
#--------------------------------------------------------------
%package -n %{libname}
2022-04-22 14:55:42 +03:00
Summary: SDL2_sound main library
Group: System/Libraries
2021-01-16 00:05:49 +01:00
%description -n %{libname}
%{summary}.
%files -n %{libname}
%doc docs/README.txt docs/INSTALL.txt
%{_libdir}/libSDL2_sound.so.%{major}
%{_libdir}/libSDL2_sound.so.%{major}.*
2022-04-22 14:55:42 +03:00
2021-01-16 00:05:49 +01:00
#--------------------------------------------------------------
2022-04-22 14:55:42 +03:00
2021-01-16 00:05:49 +01:00
%package -n %{develname}
2022-04-22 14:55:42 +03:00
Summary: Development files for SDL2_sound applications
Group: Development/C
Requires: %{libname} = %{EVRD}
Provides: SDL2_sound-devel = %{EVRD}
Provides: lib%{name}-devel = %{EVRD}
Provides: %{name}-devel = %{EVRD}
2021-01-16 00:05:49 +01:00
%description -n %{develname}
%{summary}.
%files -n %{develname}
%{_libdir}/lib*.so
%{_includedir}/SDL2/SDL_sound.h
2022-04-22 14:55:42 +03:00
2021-01-16 00:05:49 +01:00
#-------------------------------------------------------------
%prep
2022-04-22 14:55:42 +03:00
%autosetup -p1 -n %{oname}-%{version}
2021-01-16 00:05:49 +01:00
%build
export CFLAGS="%{optflags} -lm -lSDL2"
%cmake
%make
%install
%makeinstall_std -C build
# remove static stuff
find %{buildroot}%{_libdir} -name '*.la' -o -name "*.a" -exec rm {} \;