# # spec file for package cargo-c # # Copyright (c) 2021 SUSE LLC # Copyright (c) 2019 Andreas Schneider . # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %global rustflags -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2 Name: cargo-c Version: 0.8.1~git0.cce1b08 Release: 1.1 Summary: Helper to build and install c-like libraries from Rust License: MIT Group: Development/Languages/Rust URL: https://crates.io/crates/cargo-c Source0: %{name}-%{version}.tar.xz Source1: vendor.tar.xz Source2: cargo_config Source1000: README.suse-maint BuildRequires: cargo BuildRequires: pkgconfig(openssl) %description The is a cargo applet to build and install C-ABI compatibile dynamic and static libraries from Rust. It produces and installs a correct pkg-config file, a static library and a dynamic library, and a C header to be used by any C (and C-compatible) software. %prep %autosetup -a1 -p1 install -d -m 0755 .cargo cp %{SOURCE2} .cargo/config %build export RUSTFLAGS="%{rustflags}" cargo build --offline --release %install export RUSTFLAGS="%{rustflags}" cargo install --offline --root=%{buildroot}%{_prefix} --path . find %{buildroot} -name .crates2.json -delete rm -rf %{buildroot}%{_datadir}/cargo/registry rm %{buildroot}%{_prefix}/.crates.toml %files %license LICENSE %doc README.md %{_bindir}/cargo-capi %{_bindir}/cargo-cbuild %{_bindir}/cargo-cinstall %{_bindir}/cargo-ctest %changelog * Wed Jun 2 2021 william.brown@suse.com - Update to version 0.8.1~git0.cce1b08: * Prepare for release * Set the capi.library.rustflags * Add a simple way to set the RUSTFLAGS from Cargo.toml * CI: test example project in Windows/MSYS2 (#191) * Update cargo requirement from 0.52 to 0.53 * Upgrade to GitHub-native Dependabot * Default to nightly * Use codecov * Move the code coverage in a stand-alone script * Enable colored help * Tue Apr 6 2021 William Brown - Add README.suse-maint to fix OBS warning. * Mon Apr 5 2021 Antonio Larrosa - Update to version 0.8.0 * cbindgen 0.18 * provide a cli option to have fully static builds. * cargo cinstall and cargo capi install now imply --release to match the behavior of cargo install. * Wed Jan 13 2021 Andreas Schneider - Update to version 0.7.0 * https://github.com/lu-zero/cargo-c/releases/tag/v0.7.0 * Sun Oct 18 2020 Andreas Schneider - Update to version 0.6.15 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.15 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.14 - Removed 123.patch * Tue Oct 13 2020 Andreas Schneider - Added 123.patch * Save the include subdir to a specific field * Wed Sep 9 2020 Andreas Schneider - Update to version 0.6.13 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.13 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.12 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.11 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.10 * Mon Jul 13 2020 Andreas Schneider - Update to version 0.6.9 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.9 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.8 * Mon Jun 8 2020 Andreas Schneider - Update to version 0.6.7 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.7 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.6 * Tue Jun 2 2020 Andreas Schneider - Update to version 0.6.5 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.5 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.4 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.3 * Thu Apr 2 2020 Andreas Schneider - Update to version 0.6.2 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.2 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.1 * https://github.com/lu-zero/cargo-c/releases/tag/v0.6.0 * Sun Dec 15 2019 Andreas Schneider - Update to version 0.5.0 * https://github.com/lu-zero/cargo-c/releases/tag/v0.5.0 * https://github.com/lu-zero/cargo-c/releases/tag/v0.4.0 * Mon Dec 9 2019 Andreas Schneider - Set rust compiler and rust flags * Wed Nov 20 2019 Andreas Schneider - Initial package version 0.3.1