summaryrefslogtreecommitdiff
path: root/.copr/Makefile
diff options
context:
space:
mode:
authorThomas Schneider <qsx@chaotikum.eu>2024-04-04 00:10:44 +0200
committerThomas Schneider <qsx@chaotikum.eu>2024-04-04 00:10:44 +0200
commit5dc8aba0cdf7dea89bf43eeb2fe72371b04aaea4 (patch)
tree22ecab9e97d132a486ec5a57eb0ad9e1a536a483 /.copr/Makefile
Initial packaging
Diffstat (limited to '.copr/Makefile')
-rw-r--r--.copr/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/.copr/Makefile b/.copr/Makefile
new file mode 100644
index 0000000..94d6fda
--- /dev/null
+++ b/.copr/Makefile
@@ -0,0 +1,18 @@
+spec ?= $(wildcard *.spec)
+ifneq ($(words spec),1)
+$(error More than one spec file: $(spec))
+endif
+outdir ?= $(CURDIR)
+sourcedir = $(shell rpmbuild -E '%_sourcedir')
+
+srpm: $(spec) /usr/bin/spectool
+ spectool -R -g $(spec)
+ env -C $(sourcedir) \
+ sha512sum -c $(CURDIR)/sources || \
+ (find $(sourcedir) -type f -delete; exit 1)
+ rpmbuild -D "_srcrpmdir $(outdir)" -bs $(spec)
+
+.PHONY: srpm
+
+%:
+ dnf -y install $@