diff --git a/README.md b/README.md index fbc1e86..8a755f1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # zita-resampler +Libzita-resampler is a C++ library for resampling audio signals. It is designed to be used within a real-time processing context, to be fast, and to provide high-quality sample rate conversion. + diff --git a/zita-resampler.spec b/zita-resampler.spec new file mode 100644 index 0000000..013a800 --- /dev/null +++ b/zita-resampler.spec @@ -0,0 +1,96 @@ +Name: zita-resampler +Version: 1.8.0 +Release: 1mamba +Summary: A C++ library for resampling audio signals +Group: Applications/Multimedia +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/digital-stage/zita-resampler +Source: https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-resampler-%{version}.tar.bz2 +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libsndfile-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description +Libzita-resampler is a C++ library for resampling audio signals. It is designed to be used within a real-time processing context, to be fast, and to provide high-quality sample rate conversion. + +%package -n lib%{name} +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name} +This package contains shared libraries for %{name}. + +%package -n lib%{name}-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n lib%{name}-devel +This package contains libraries and header files for developing applications that use %{name}. + + +%debug_package + +%prep +%setup -q +# FS#36248 - strip march=native +sed -e '/native/d' \ + -i {source,apps}/Makefile +# removing local call to ldconfig +sed -e '/ldconfig/d' -i source/Makefile +# fix use of BINDIR and MANDIR without preceeding DESTDIR +sed -e 's/\ $(BINDIR)/\ $(DESTDIR)$(BINDIR)/' \ + -e 's/\ $(MANDIR)/\ $(DESTDIR)$(MANDIR)/' \ + -i apps/Makefile + +%ifnarch %{ix86} x86_64 +sed -i "s|-DENABLE_SSE2||" source/Makefile +%endif + +%build +# libs +make -C source +# create lib link for building apps +ln -sv lib%{name}.so.%{version} source/lib%{name}.so +# apps +make LDFLAGS+=" -L../source" CXXFLAGS+=" -I../source" -C apps + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall -C source PREFIX=%{_prefix} LIBDIR=%{_libdir} +%makeinstall -C apps PREFIX=%{_prefix} + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/zresample +%{_bindir}/zretune +%{_mandir}/man1/zresample.1* +%{_mandir}/man1/zretune.1* + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libzita-resampler.so.* +%doc AUTHORS COPYING + +%files -n lib%{name}-devel +%defattr(-,root,root) +%dir %{_includedir}/zita-resampler +%{_includedir}/zita-resampler/*.h +%{_libdir}/libzita-resampler.so + +%changelog +* Tue May 11 2021 Silvan Calarco 1.8.0-1mamba +- package created using the webbuild interface