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-findshlibs/rust-findshlibs.spec

96 lines
2.4 KiB

# Generated by rust2rpm 10
%bcond_without check
%global debug_package %{nil}
%global crate findshlibs
Name: rust-%{crate}
Version: 0.5.0
Release: 1%{?dist}
Summary: Find the set of shared libraries loaded in the current process
# Upstream license specification: Apache-2.0/MIT
License: ASL 2.0 or MIT
URL: https://crates.io/crates/findshlibs
Source: %{crates_source}
# Fix address/bias on 32-bit systems
# https://github.com/gimli-rs/findshlibs/commit/760f122b42aca9d41e7f8de533bffca60e715727
Patch0: 0001-Fix-address-bias-on-32-bit-systems.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Find the set of shared libraries loaded in the current process with a cross
platform API.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE-APACHE LICENSE-MIT
%doc ./README.md
%{cargo_registry}/%{crate}-%{version}/
%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 "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%package -n %{name}+nightly-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+nightly-devel %{_description}
This package contains library source intended for building other packages
which use "nightly" feature of "%{crate}" crate.
%files -n %{name}+nightly-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
# Sometimes Rust sources start with #![...] attributes, and "smart" editors think
# it's a shebang and make them executable. Then brp-mangle-shebangs gets upset...
find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Fri Dec 06 18:20:28 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.5.0-1
- Initial package