Name: DeepFilterNet Version: 0.5.6 Release: %{autorelease} Summary: Speech enhancement framework for full-band audio License: %{shrink: ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND (BSD-3-Clause) AND (BSD-3-Clause OR MIT OR Apache-2.0) AND (MIT) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) } URL: https://github.com/Rikorose/%{name} Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: /usr/bin/crudini BuildRequires: cargo BuildRequires: cargo-rpm-macros BuildRequires: python3-rpm-macros %global desc %{expand:A low complexity speech enhancement framework for full-band audio (48khz) using deep filtering. } %description %{desc} %package -n deep-filter-ladspa Summary: Speech enhancement framework for full-band audio, LADSPA plugin %description -n deep-filter-ladspa %{desc} This package provides a LASPA plugin. %prep %{autosetup} cd ladspa/ %{cargo_prep} ## We don't have the necessary dependencies in Fedora, and, given the ## old versions specified, adding them would be quite burdensome. ## Instead, use an Internet-enabled mock build to fetch the dependencies ## at build-time. ## ## This needs fixing if we ever have ambitions of getting this package ## into Fedora proper. crudini --set --existing .cargo/config.toml net offline false \ --del --existing .cargo/config.toml source.crates-io # # # %%generate_buildrequires # cd ladspa/ # %%{cargo_generate_buildrequires} %build cd ladspa/ %{__cargo} update %{cargo_build} ## These are the commands that %%cargo_license_* and ## %%cargo_vendor_manifest run, with the (here unwelcome) addition of ## the --offline option. Pre-run them, to cause the metadata to be ## cached. %{__cargo} tree -Zavoid-dev-deps --workspace --edges=no-build,no-dev,no-proc-macro --no-dedupe --target=all --prefix=none >/dev/null %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{__cargo} tree --workspace --edges=normal,build,dev --no-dedupe --target=all --all-features --prefix=none >/dev/null %{cargo_vendor_manifest} # %%__cargo_vendor_provides is confused by internal dependencies. sed -Ei 's/ \(.+BUILD\/DeepFilterNet-.+\)//' cargo-vendor.txt %install install -D --mode=0755 --target-directory=%{buildroot}%{_libdir}/ladspa/ \ target/rpm/libdeep_filter_ladspa.so %check cd ladspa/ %{cargo_test} %files -n deep-filter-ladspa %doc ladspa/README.md %license ladspa/LICENSE %license ladspa/LICENSE-APACHE %license ladspa/LICENSE-MIT %license ladspa/LICENSE.dependencies %license ladspa/cargo-vendor.txt %{_libdir}/ladspa/libdeep_filter_ladspa.so %changelog %{autochangelog}