public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Fabio Valentini <decathorpe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-cargo-c] eln: Add RPM macros for cargo-cbuild and cargo-cinstall
Date: Thu, 15 Oct 2026 01:27:26 GMT [thread overview]
Message-ID: <179202764647.1.17738805599470372003.rpms-rust-cargo-c-437f5cf13214@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rust-cargo-c
Branch : eln
Commit : 437f5cf13214f13c2c9c40966ebebcc9b2a370b0
Author : Fabio Valentini <decathorpe@gmail.com>
Date : 2023-07-07T15:50:22+02:00
Stats : +26/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rust-cargo-c/c/437f5cf13214f13c2c9c40966ebebcc9b2a370b0?branch=eln
Log:
Add RPM macros for cargo-cbuild and cargo-cinstall
---
diff --git a/macros.cargo-c b/macros.cargo-c
new file mode 100644
index 0000000..9168f25
--- /dev/null
+++ b/macros.cargo-c
@@ -0,0 +1,22 @@
+%cargo_cbuild %{shrink:\
+ %{__cargo} cbuild \
+ %{__cargo_common_opts} \
+ --release \
+ --destdir=%{buildroot} \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --includedir=%{_includedir} \
+ --pkgconfigdir=%{_libdir}/pkgconfig \
+}
+
+%cargo_cinstall %{shrink:\
+ %{__cargo} cinstall \
+ %{__cargo_common_opts} \
+ --release \
+ --destdir=%{buildroot} \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --includedir=%{_includedir} \
+ --pkgconfigdir=%{_libdir}/pkgconfig \
+}
+
diff --git a/rust-cargo-c.spec b/rust-cargo-c.spec
index ed9093c..e87e0af 100644
--- a/rust-cargo-c.spec
+++ b/rust-cargo-c.spec
@@ -14,7 +14,8 @@ Summary: Helper program to build and install c-like libraries
License: MIT
URL: https://crates.io/crates/cargo-c
-Source: %{crates_source %{crate} %{upstream_version}}
+Source0: %{crates_source %{crate} %{upstream_version}}
+Source1: macros.cargo-c
# Automatically generated patch to strip foreign dependencies
Patch: cargo-c-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
@@ -59,6 +60,7 @@ License: Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-
%{_bindir}/cargo-cbuild
%{_bindir}/cargo-cinstall
%{_bindir}/cargo-ctest
+%{_rpmmacrodir}/macros.cargo-c
%package devel
Summary: %{summary}
@@ -100,6 +102,7 @@ use the "default" feature of the "%{crate}" crate.
%install
%cargo_install
+install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} %{SOURCE1}
%if %{with check}
%check
reply other threads:[~2026-10-15 1:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179202764647.1.17738805599470372003.rpms-rust-cargo-c-437f5cf13214@fedoraproject.org \
--to=decathorpe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox