You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-jiff/SPECS/rust-jiff.spec

285 lines
9.7 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# Generated by rust2rpm 27
%bcond check 1
%global debug_package %{nil}
%global crate jiff
Name: rust-jiff
Version: 0.1.23
Release: %autorelease
Summary: Date-time library that encourages you to jump into the pit of success
License: Unlicense OR MIT
URL: https://crates.io/crates/jiff
Source: %{crates_source}
# * Since 0.1.22, the published crates no longer include “non-essential files
# (including tests and test data).” Since we would like to run the tests, we
# use the GitHub archive as an additonal source as permitted in
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_package_sources,
# waiting until %%check to copy in the extra files to prove they are not
# included in the crate sources shipped in the binary RPMs.
Source10: https://github.com/BurntSushi/jiff/archive/%{version}/jiff-%{version}.tar.gz
# Automatically generated patch to strip dependencies and normalize metadata
Patch: jiff-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * Drop dev-dependency hifitime: not packaged, and only for doctests
# * Drop dev-dependency serde_yml: not packaged; we have patched out the tests
# that require it
Patch: jiff-fix-metadata.diff
# * Downstream-only: Omit doctests that require hifitime. It is not worth
# packaging it solely for a couple of tiny examples.
Patch10: 0001-Downstream-only-Omit-doctests-that-require-hifitime.patch
# * Downstream-only: Omit doctests that require icu.
Patch11: 0001-Downstream-only-Omit-doctests-that-require-icu.patch
# * Downstream-only: Omit tests that require serde_yml.
Patch12: 0001-Downstream-only-omit-tests-that-require-serde_yml.patch
# * EPEL9: Ignore doctests that require very recent Rust compilers
# * In this crate, doctests and examples (but not the lib and integration tests)
# are allowed to use Rust features from versions newer than the MSRV. Its
# therefore necessary to ignore some of them on EPEL9. If this patch becomes too
# unwieldy, we could choose to start skipping doctests and/or examples there
# entirely.
Patch1009: 0001-EPEL9-Ignore-doctests-that-require-very-recent-Rust-.patch
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: tomcli
%global _description %{expand:
A date-time library that encourages you to jump into the pit of success.
This library is heavily inspired by the Temporal project.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/COPYING
%license %{crate_instdir}/LICENSE-MIT
%license %{crate_instdir}/UNLICENSE
%doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/COMPARE.md
%doc %{crate_instdir}/DESIGN.md
%doc %{crate_instdir}/PLATFORM.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%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}+alloc-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+alloc-devel %{_description}
This package contains library source intended for building other packages which
use the "alloc" feature of the "%{crate}" crate.
%files -n %{name}+alloc-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+logging-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+logging-devel %{_description}
This package contains library source intended for building other packages which
use the "logging" feature of the "%{crate}" crate.
%files -n %{name}+logging-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+serde-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+serde-devel %{_description}
This package contains library source intended for building other packages which
use the "serde" feature of the "%{crate}" crate.
%files -n %{name}+serde-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+std-devel %{_description}
This package contains library source intended for building other packages which
use the "std" feature of the "%{crate}" crate.
%files -n %{name}+std-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+tz-system-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+tz-system-devel %{_description}
This package contains library source intended for building other packages which
use the "tz-system" feature of the "%{crate}" crate.
%files -n %{name}+tz-system-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+tzdb-bundle-platform-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+tzdb-bundle-platform-devel %{_description}
This package contains library source intended for building other packages which
use the "tzdb-bundle-platform" feature of the "%{crate}" crate.
%files -n %{name}+tzdb-bundle-platform-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+tzdb-concatenated-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+tzdb-concatenated-devel %{_description}
This package contains library source intended for building other packages which
use the "tzdb-concatenated" feature of the "%{crate}" crate.
%files -n %{name}+tzdb-concatenated-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+tzdb-zoneinfo-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+tzdb-zoneinfo-devel %{_description}
This package contains library source intended for building other packages which
use the "tzdb-zoneinfo" feature of the "%{crate}" crate.
%files -n %{name}+tzdb-zoneinfo-devel
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version} -N
# NOTE: The -p1 in %%autosetup, above, must be replaced with -N so that we can
# do conditional patching, below.
%autopatch -M 999 -p1
# We reserved patch number 1000+<N> for EPEL<N>.
%if 0%{?el9}
%patch -P 1009 -p1
%endif
# We do not yet have a rust-icu package (although one would be desirable)
tomcli set Cargo.toml del dev-dependencies.icu
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires -f serde
%build
%cargo_build -f serde
%install
%cargo_install -f serde
%if %{with check}
%check
# Copy in snapshots, integration tests, and test data required to run tests,
# but not included in the released crate. By doing so here in %%check rather
# than in %%prep, we prove that the binary RPMs are derived solely from the
# published crate sources.
tar -xzvf '%{SOURCE10}' --strip-components=1 \
jiff-%{version}/src/tz/snapshots \
jiff-%{version}/src/tz/testdata \
jiff-%{version}/tests
%cargo_test -f serde
%endif
%changelog
## START: Generated by rpmautospec
* Tue Jan 14 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.23-2
- Restore testing by using the GitHub archive as an additional source
* Tue Jan 14 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.23-1
- Update to 0.1.23 (close RHBZ#2337484)
* Sun Jan 05 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.21-1
- Update to 0.1.21 (close RHBZ#2335585)
* Sat Jan 04 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.20-1
- Update to 0.1.20 (close RHBZ#2335533)
* Thu Jan 02 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.19-1
- Update to 0.1.19 (close RHBZ#2335313)
* Wed Jan 01 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.18-1
- Update to 0.1.18 (close RHBZ#2335119)
* Tue Dec 31 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.17-1
- Update to 0.1.17 (close RHBZ#2335070)
* Fri Dec 27 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.16-1
- Update to 0.1.16 (close RHBZ#2334259)
* Fri Dec 20 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 0.1.15-3
- Rebuilt for MSVSphere 10
* Mon Dec 09 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.15-3
- Add upstream link for chrono-tz patch
* Sun Dec 08 2024 Fabio Valentini <decathorpe@gmail.com> - 0.1.15-2
- Relax chrono-tz dependency to allow building with 0.9 and 0.10
* Sat Nov 30 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.15-1
- Update to 0.1.15 (close RHBZ#2329631)
* Mon Nov 11 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.14-1
- Update to 0.1.14 (close RHBZ#2323154)
* Thu Sep 19 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.13-2
- On EPEL9, disable doctests that require a newer Rust compiler
* Sun Sep 08 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.13-1
- Update to 0.1.13 (close RHBZ#2310620)
* Mon Sep 02 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.12-1
- Update to 0.1.12 (close RHBZ#2309076)
* Sat Aug 24 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.10-1
- Update to 0.1.10
* Sat Aug 24 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.8-3
- Stop allowing chrono-tz 0.8, since we have 0.9
* Sat Aug 24 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.8-1
- Initial package (close RHBZ#2307325)
## END: Generated by rpmautospec