public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust] rawhide: Add copr srpm makefile
@ 2026-10-15 18:12 Paul Murphy
  0 siblings, 0 replies; only message in thread
From: Paul Murphy @ 2026-10-15 18:12 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rust
            Branch : rawhide
            Commit : ee7a5c4f23ddc620daceef4d5ad9cbcabeaf9e47
            Author : Paul Murphy <murp@redhat.com>
            Date   : 2026-10-15T11:11:41-07:00
            Stats  : +18/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/rust/c/ee7a5c4f23ddc620daceef4d5ad9cbcabeaf9e47?branch=rawhide

            Log:
            Add copr srpm makefile

This seems to be the most flexible way to prepare an srpm
with copr. It's loosely based off LLVM's.

rpmautospec is explicitly run. copr will repackage this srpm
in an environment without the distgit history.

[skip changelog]

---
diff --git a/.copr/Makefile b/.copr/Makefile
new file mode 100644
index 0000000..b233192
--- /dev/null
+++ b/.copr/Makefile
@@ -0,0 +1,18 @@
+# See "make srpm" within https://docs.copr.fedorainfracloud.org/user_documentation.html#scm
+
+outdir?=$(shell pwd)
+spec?=rust.spec
+required_packages=rpmdevtools rpmautospec
+
+.PHONY: srpm
+srpm:
+	rpm -q $(required_packages) || dnf install -y $(required_packages) --setopt=install_weak_deps=False
+
+	spectool -g $(spec) --directory $(shell pwd)
+
+	rpmautospec process-distgit $(spec) $(spec)
+
+	rpmbuild \
+		--define "_sourcedir $(shell pwd)" \
+		--define "_srcrpmdir $(outdir)" \
+		-bs $(spec)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-15 18:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15 18:12 [rpms/rust] rawhide: Add copr srpm makefile Paul Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox