cargo-c/cargo-c.spec

58 lines
1.6 KiB
RPMSpec
Raw Permalink Normal View History

Name: cargo-c
Version: 0.9.14
Release: 1mamba
Summary: A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries
Group: Development/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/lu-zero/cargo-c/
Source: https://github.com/lu-zero/cargo-c.git/v%{version}/cargo-c-%{version}.tar.bz2
Source1: https://github.com/lu-zero/cargo-c/releases/download/v%{version}/Cargo.lock
Source2: cargo-c-autoupdate
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libcurl-devel
BuildRequires: libgcc
BuildRequires: libgit2-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
%description
A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries.
%debug_package
%prep
%setup -q
# Cargo.lock
cp %{SOURCE1} .
cargo fetch --locked --manifest-path="Cargo.toml"
%build
export CFLAGS+=' -ffat-lto-objects'
export RUSTUP_TOOLCHAIN='stable'
export CARGO_TARGET_DIR="target"
cargo build --release --frozen --all-features --manifest-path="Cargo.toml"
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
find target/release -maxdepth 1 -type f -executable -exec install -D -m755 -t %{buildroot}%{_bindir} {} +
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/cargo-capi
%{_bindir}/cargo-cbuild
%{_bindir}/cargo-cinstall
%{_bindir}/cargo-ctest
%doc LICENSE
%changelog
* Sat Nov 26 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.14-1mamba
- package created using the webbuild interface