Blob Blame Raw
# Generated by rust2rpm 10 + a lot of manual work
%bcond_without check
%global __cargo_skip_build 0

Name:           zola
Version:        0.8.0
Release:        5%{?dist}
Summary:        Fast static site generator with everything built-in

License:        MIT
URL:            https://www.getzola.org/
Source:         https://github.com/getzola/zola/archive/v%{version}/%{name}-%{version}.tar.gz
# * Update toml to 0.5 everywhere, https://github.com/getzola/zola/pull/718
Patch0001:      0001-chore-Update-toml-to-0.5-everywhere.patch
# Initial patched metadata
# - Bump ammonia to 3.0.0 https://github.com/getzola/zola/pull/800
# - Bump pulldown-cmark to 0.6 (upstreamed)
# - Bump image to 0.22
Patch0002:      zola-fix-metadata.diff
# https://github.com/getzola/zola/pull/720/commits/4fd5d3f348c481e30af698d3249715bd9d6355be
Patch0003:      0001-Bump-pulldown_cmark-to-version-0.6.0.patch

ExclusiveArch:  %{rust_arches}

BuildRequires:  rust-packaging
# Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(actix-files/default) >= 0.1.0 with crate(actix-files/default) < 0.2.0)
BuildRequires:  (crate(actix-web) >= 1.0.0 with crate(actix-web) < 2.0.0)
BuildRequires:  (crate(atty/default) >= 0.2.11 with crate(atty/default) < 0.3.0)
BuildRequires:  (crate(chrono/default) >= 0.4.0 with crate(chrono/default) < 0.5.0)
BuildRequires:  (crate(clap/default) >= 2.0.0 with crate(clap/default) < 3.0.0)
BuildRequires:  (crate(ctrlc/default) >= 3.0.0 with crate(ctrlc/default) < 4.0.0)
BuildRequires:  (crate(lazy_static/default) >= 1.1.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(notify/default) >= 4.0.0 with crate(notify/default) < 5.0.0)
BuildRequires:  (crate(termcolor/default) >= 1.0.4 with crate(termcolor/default) < 2.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
BuildRequires:  (crate(url/default) >= 1.5.0 with crate(url/default) < 2.0.0)
BuildRequires:  (crate(ws/default) >= 0.8.0 with crate(ws/default) < 0.9.0)
%endif
## for c in *; echo "# components/$c/Cargo.toml" && rust2rpm-dev - $c/Cargo.toml | sed -n -e '/^BuildRequires:/,/%%global/ p' | head -n -2; end
# components/config/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(chrono/default) >= 0.4.0 with crate(chrono/default) < 0.5.0)
BuildRequires:  (crate(globset/default) >= 0.4.0 with crate(globset/default) < 0.5.0)
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires:  (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
BuildRequires:  (crate(syntect/default) >= 3.0.0 with crate(syntect/default) < 4.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
%endif
# components/errors/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(image/default) >= 0.22.0 with crate(image/default) < 0.23.0)
BuildRequires:  (crate(syntect/default) >= 3.0.0 with crate(syntect/default) < 4.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
%endif
# components/front_matter/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(chrono/default) >= 0.4.0 with crate(chrono/default) < 0.5.0)
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0)
BuildRequires:  (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires:  (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
%endif
# components/imageproc/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(image/default) >= 0.22.0 with crate(image/default) < 0.23.0)
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0)
BuildRequires:  (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
%endif
# components/library/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(chrono/default) >= 0.4.0 with crate(chrono/default) < 0.5.0)
BuildRequires:  (crate(chrono/serde) >= 0.4.0 with crate(chrono/serde) < 0.5.0)
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0)
BuildRequires:  (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0)
BuildRequires:  (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires:  (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
BuildRequires:  (crate(slotmap/default) >= 0.2.0 with crate(slotmap/default) < 0.3.0)
BuildRequires:  (crate(slug/default) >= 0.1.0 with crate(slug/default) < 0.2.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
%if %{with check}
BuildRequires:  (crate(globset/default) >= 0.4.0 with crate(globset/default) < 0.5.0)
BuildRequires:  (crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
%endif
%endif
# components/link_checker/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(reqwest/default) >= 0.9.0 with crate(reqwest/default) < 0.10.0)
%endif
# components/rebuild/Cargo.toml
%if ! %{__cargo_skip_build}
%if %{with check}
BuildRequires:  (crate(fs_extra/default) >= 1.1.0 with crate(fs_extra/default) < 2.0.0)
BuildRequires:  (crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0)
%endif
%endif
# components/rendering/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(pest/default) >= 2.0.0 with crate(pest/default) < 3.0.0)
BuildRequires:  (crate(pest_derive/default) >= 2.0.0 with crate(pest_derive/default) < 3.0.0)
BuildRequires:  (crate(pulldown-cmark/default) >= 0.6.0 with crate(pulldown-cmark/default) < 0.7.0)
BuildRequires:  (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0)
BuildRequires:  (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires:  (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
BuildRequires:  (crate(slug/default) >= 0.1.0 with crate(slug/default) < 0.2.0)
BuildRequires:  (crate(syntect/default) >= 3.0.0 with crate(syntect/default) < 4.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
BuildRequires:  (crate(tera/preserve_order) >= 1.0.0~beta.10 with crate(tera/preserve_order) < 2.0.0)
%endif
# components/search/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(ammonia/default) >= 3.0.0 with crate(ammonia/default) < 4.0.0)
BuildRequires:  (crate(elasticlunr-rs/default) >= 2.0.0 with crate(elasticlunr-rs/default) < 3.0.0)
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
%endif
# components/site/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(glob/default) >= 0.3.0 with crate(glob/default) < 0.4.0)
BuildRequires:  (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0)
BuildRequires:  (crate(sass-rs/default) >= 0.2.0 with crate(sass-rs/default) < 0.3.0)
BuildRequires:  (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires:  (crate(serde_derive/default) >= 1.0.0 with crate(serde_derive/default) < 2.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
%if %{with check}
BuildRequires:  (crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0)
%endif
%endif
# components/templates/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(base64/default) >= 0.10.0 with crate(base64/default) < 0.11.0)
BuildRequires:  (crate(csv/default) >= 1.0.0 with crate(csv/default) < 2.0.0)
BuildRequires:  (crate(image/default) >= 0.22.0 with crate(image/default) < 0.23.0)
BuildRequires:  (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires:  (crate(pulldown-cmark/default) >= 0.6.0 with crate(pulldown-cmark/default) < 0.7.0)
BuildRequires:  (crate(reqwest/default) >= 0.9.0 with crate(reqwest/default) < 0.10.0)
BuildRequires:  (crate(serde_json/default) >= 1.0.0 with crate(serde_json/default) < 2.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
BuildRequires:  (crate(url/default) >= 1.5.0 with crate(url/default) < 2.0.0)
%endif
# components/utils/Cargo.toml
%if ! %{__cargo_skip_build}
BuildRequires:  (crate(serde/default) >= 1.0.0 with crate(serde/default) < 2.0.0)
BuildRequires:  (crate(tera/default) >= 1.0.0~beta.10 with crate(tera/default) < 2.0.0)
BuildRequires:  (crate(toml/default) >= 0.5.0 with crate(toml/default) < 0.6.0)
BuildRequires:  (crate(unicode-segmentation/default) >= 1.2.0 with crate(unicode-segmentation/default) < 2.0.0)
BuildRequires:  (crate(walkdir/default) >= 2.0.0 with crate(walkdir/default) < 3.0.0)
%if %{with check}
BuildRequires:  (crate(tempfile/default) >= 3.0.0 with crate(tempfile/default) < 4.0.0)
%endif
%endif

# src/cmd/livereload.js
Provides:       bundled(js-livereload-js) = 2.2.1
# components/search/src/elasticlunr.min.js
Provides:       bundled(js-elasticlunr-js) = 0.9.5

%description
%{summary}.

%prep
%autosetup -p1
# https://bugzilla.redhat.com/show_bug.cgi?id=1723064
%ifarch %{ix86} armv7hl
sed -i -e '/lto/d' Cargo.toml
%endif
%cargo_prep

%build
%cargo_build

%install
%cargo_install
install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions \
  completions/zola.bash
install -Dpm0644 -t %{buildroot}%{_datadir}/fish/vendor_completions.d \
  completions/zola.fish
install -Dpm0644 -t %{buildroot}%{_datadir}/zsh/site-functions \
  completions/_zola

%if %{with check}
%check
%cargo_test
%endif

%files
%license LICENSE
%doc README.md CHANGELOG.md
%{_bindir}/zola
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/zola.bash
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/zola.fish
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_zola

%changelog
* Fri Sep 13 19:18:54 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.8.0-5
- Bump ammonia to 3.0.0
- Bump pulldown-cmark to 0.6
- Bump image to 0.22

* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sun Jul 21 18:29:00 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-3
- Correct fish completions directory

* Mon Jun 24 13:09:35 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-2
- Update toml to 0.5
- Bring 32bit packages back, but without LTO

* Sat Jun 22 14:24:19 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.8.0-1
- Initial package