# Generated by rust2rpm 26 %bcond_without check %global crate redlib Name: rust-redlib Version: 0.35.1 Release: %autorelease Summary: Alternative private front-end to Reddit License: AGPL-3.0-only URL: https://crates.io/crates/redlib Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Bump cached to 0.53 # * Temporarily downgrade brotli to 3.5 # * Fix license tag: https://github.com/redlib-org/redlib/pull/200 Patch: redlib-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: systemd-rpm-macros %global _description %{expand: Redlib is alternative private front-end to Reddit, with its origins in Libreddit. Redlib hopes to provide an easier way to browse Reddit, without the ads, trackers, and bloat.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # AGPL-3.0-only # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR ISC OR MIT # Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # BSD-3-Clause AND MIT # ISC # ISC AND MIT AND OpenSSL # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # Unlicense OR MIT # Zlib # Zlib OR Apache-2.0 OR MIT License: ((MIT OR Apache-2.0) AND Unicode-DFS-2016) AND AGPL-3.0-only AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND (BSD-3-Clause AND MIT) AND ISC AND (ISC AND MIT AND OpenSSL) AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/redlib %doc CREDITS %config(noreplace) %{_sysconfdir}/redlib.conf %{_unitdir}/redlib.service %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install install -Dpm0644 -t %{buildroot}%{_sysconfdir} contrib/redlib.conf install -Dpm0644 -t %{buildroot}%{_unitdir} contrib/redlib.service %post %systemd_post redlib.service %preun %systemd_preun redlib.service %postun %systemd_postun_with_restart redlib.service %if %{with check} %check # * skip tests requiring Internet access %cargo_test -- -- --exact --skip client::test_localization_popular --skip client::test_obfuscated_share_link --skip client::test_share_link_strip_json --skip oauth::test_oauth_client --skip oauth::test_oauth_token_exists --skip subreddit::test_fetching_subreddit --skip user::test_fetching_user --skip utils::test_fetching_nsfw_subreddit --skip utils::test_fetching_subreddit_quarantined --skip utils::test_fetching_ws %endif %changelog %autochangelog