# Generated by rust2rpm 27 %bcond check 1 %global crate mdbook %global bundled_deps %{expand:\ # src/theme/clipboard.min.js # MIT Provides: bundled(clipboard.js) = 2.0.4 # src/theme/highlight.js # src/theme/*-highlight.css # BSD-3-Clause, themes: MIT Provides: bundled(highlight.js) = 10.1.1 # src/theme/FontAwesome # OFL-1.1, MIT Provides: bundled(font(fontawesome)) = 4.7.0 # src/fonts/open-sans-* # Apache-2.0 Provides: bundled(font(opensans)) = 17 # src/fonts/source-code-pro-* # OFL-1.1 Provides: bundled(font(sourcecodepro)) = 11 # src/playground_editor/ace.js # BSD-3-Clause Provides: bundled(ace.js) # src/searcher/elasticlunr.min.js # MIT Provides: bundled(elasticlunr.js) = 0.9.5 # src/searcher/mark.min.js # MIT Provides: bundled(mark.js) = 8.11.1 } Name: rust-mdbook Version: 0.4.40 Release: %autorelease Summary: Creates a book from markdown files License: MPL-2.0 AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1 URL: https://crates.io/crates/mdbook Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * bump pulldown-cmark dependency from 0.10 to 0.11 # * relax opener dependency to allow building with both v0.6 and v0.7 # * reflect bundled fonts, JavaScript, and CSS in crate metadata Patch: mdbook-fix-metadata.diff # * backport of https://github.com/rust-lang/mdBook/pull/2401 Patch10: 0001-port-to-pulldown-cmark-0.11.patch BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Creates a book from markdown files.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND MIT # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # CC0-1.0 # ISC # MIT # MIT OR Apache-2.0 # MIT OR Apache-2.0 OR Zlib # MPL-2.0 AND Apache-2.0 AND BSD-3-Clause AND MIT AND OFL-1.1 # Unlicense OR MIT # Zlib OR Apache-2.0 OR MIT License: MPL-2.0 AND Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND OFL-1.1 AND Unicode-DFS-2016 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown %{bundled_deps} %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE %license src/theme/fonts/OPEN-SANS-LICENSE.txt %license src/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt %license LICENSE.dependencies %doc CHANGELOG.md %doc CODE_OF_CONDUCT.md %doc CONTRIBUTING.md %doc README.md %{_bindir}/mdbook %package devel Summary: %{summary} BuildArch: noarch %{bundled_deps} %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %license %{crate_instdir}/src/theme/fonts/OPEN-SANS-LICENSE.txt %license %{crate_instdir}/src/theme/fonts/SOURCE-CODE-PRO-LICENSE.txt %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/CODE_OF_CONDUCT.md %doc %{crate_instdir}/CONTRIBUTING.md %doc %{crate_instdir}/README.md %{crate_instdir}/ %exclude %{crate_instdir}/ci/ %exclude %{crate_instdir}/test_book/ %exclude %{crate_instdir}/release.toml %exclude %{crate_instdir}/triagebot.toml %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+search-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+search-devel %{_description} This package contains library source intended for building other packages which use the "search" feature of the "%{crate}" crate. %files -n %{name}+search-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serve-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+serve-devel %{_description} This package contains library source intended for building other packages which use the "serve" feature of the "%{crate}" crate. %files -n %{name}+serve-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+watch-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+watch-devel %{_description} This package contains library source intended for building other packages which use the "watch" feature of the "%{crate}" crate. %files -n %{name}+watch-devel %ghost %{crate_instdir}/Cargo.toml %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 %if %{with check} %check # * skip tests that require files which are not included in published crates %{cargo_test -- -- %{shrink: --skip preprocess::cmd::tests::round_trip_write_and_parse_input --skip example_book_can_build --skip theme_dir_overrides_work_correctly }} %endif %changelog %autochangelog