61 lines
1.8 KiB
RPMSpec
61 lines
1.8 KiB
RPMSpec
Name: cargo-c
|
|
Version: 0.9.20
|
|
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
|
|
# NOTE: manually renaming Cargo.lock to Cargo-%{version}.lock
|
|
Source1: https://github.com/lu-zero/cargo-c/releases/download/v%{version}/Cargo-%{version}.lock
|
|
Source2: cargo-c-autoupdate
|
|
License: MIT
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libgcc
|
|
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.lock
|
|
cargo fetch --locked --target %{_target_cpu}-unknown-linux%{_gnu} --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
|
|
* Wed Jun 07 2023 Automatic Build System <autodist@mambasoft.it> 0.9.20-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Nov 26 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.14-1mamba
|
|
- package created using the webbuild interface
|