File soundtouch.spec of Package soundtouch

Name: soundtouch
%global name_camel SoundTouch
Version: 2.4.0
Release: 0
Summary: Audio Processing Library
URL: https://codeberg.org/%{name}/%{name}
License: MIT
BuildRequires: cmake
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: cmake(fmt)
BuildRequires: rpm_macro(cmake)
BuildRequires: rpm_macro(cmake_build)
BuildRequires: rpm_macro(cmake_install)
BuildRequires: cmake

%define _description %{expand:
SoundTouch is a C++ audio processing library that allows
changing the sound tempo, pitch and playback rate parameters
independently from each other.

* Implements time stretch, pitch shift and sample rate transposing
  routines.
* Supports the 16-bit integer or 32-bit floating point
  PCM mono/stereo formats.
* Capable of real-time audio stream processing (depending on hardware).
* Additional use of assembler level and Intel MMX instruction sets.
}

%{lua:
local major, minor, patch = rpm.expand('%version'):match("^(%d+)%.(%d+)%.(%d+).*")
rpm.define('major ' .. major)
rpm.define('minor ' .. minor)
rpm.define('patch ' .. patch)
}

%global libname lib%{name_camel}%{major}

Source: %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

%package devel
Requires: %libname = %{version}-%{release}
Summary: %{summary}

%package -n %libname
Summary: %{summary}

%description devel
%{_description}

%description
%{_description}

%description -n %libname
%{_description}

%package -n soundstretch
Summary: WAV audio tuner

%description -n soundstretch
This application processes WAV audio files by modifying the sound tempo, pitch and playback rate properties.

%prep
%autosetup

%build
%cmake -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}
%cmake_build

%install
%cmake_install

%files -n %libname
%_libdir/lib%{name_camel}.so.*

%files -n soundstretch
%_bindir/soundstretch

%files devel
%_includedir/%{name}
%_libdir/pkgconfig/%{name}.pc
%_libdir/cmake/%{name_camel}
%_libdir/lib%{name_camel}.so
openSUSE Build Service is sponsored by