## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 25 %bcond_without check %global crate libcramjam Name: rust-libcramjam Version: 0.2.0 # Even though this is just MAJOR.MINOR from the SemVer version, we repeat it # explicitly to help prevent undetected/unannounced SONAME version bumps in the # libcramjam/libcramjam-devel subpackages. %global soversion 0.2 Release: %autorelease Summary: Compression library combining a plethora of algorithms License: MIT URL: https://crates.io/crates/libcramjam Source: %{crates_source} # Manually created patch for downstream crate metadata changes # - Remove inline-c dependency; it is not packaged, not currently used, and # has a significant number of dependencies of its own # - Add a [lib] table with crate-type = ["lib", "cdylib"] to get a better # template from rust2rpm # - Don’t ask for the static feature of the xz2 crate (link the liblzma # shared library instead) Patch: libcramjam-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Compression library combining a plethora of algorithms in a similar as possible API.} %description %{_description} %package -n %{crate} Summary: %{summary} # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 # BSD-3-Clause # BSD-3-Clause AND MIT # MIT # MIT OR Apache-2.0 # MIT OR Zlib OR Apache-2.0 License: %{shrink: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} This package contains libraries for using the "%{crate}" crate via a C API. %files -n %{crate} %license LICENSE %license LICENSE.dependencies %doc README.md %{_libdir}/%{crate}.so.%{soversion}{,.*} %package -n %{crate}-devel Summary: %{summary} Requires: %{crate}%{?_isa} = %{version}-%{release} %description -n %{crate}-devel %{_description} This package contains libraries and header files for developing applications that use the "%{crate}" crate via a C API. %files -n %{crate}-devel %{_includedir}/cramjam/cramjam.h %{_libdir}/%{crate}.so %{_libdir}/pkgconfig/%{crate}.pc %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}/LICENSE %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}+capi-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+capi-devel %{_description} This package contains library source intended for building other packages which use the "capi" feature of the "%{crate}" crate. %files -n %{name}+capi-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+libc-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+libc-devel %{_description} This package contains library source intended for building other packages which use the "libc" feature of the "%{crate}" crate. %files -n %{name}+libc-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires # cargo-c requires all optional dependencies to be available %cargo_generate_buildrequires -a echo "cargo-c" %build %cargo_build %cargo_cbuild %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %cargo_install %cargo_cinstall # https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries rm '%{buildroot}%{_libdir}/%{crate}.a' %if %{with check} %check %cargo_test %endif %changelog ## START: Generated by rpmautospec * Sat Feb 03 2024 Benjamin A. Beasley - 0.2.0-1 - Update to 0.2.0 (close RHBZ#2262481) * Wed Jan 31 2024 Benjamin A. Beasley - 0.1.5-1 - Initial package (close RHBZ#2257076) ## END: Generated by rpmautospec