From 716d60d3783d8f64df42446d4c28bcf806d1d1ac Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Thu, 4 Apr 2024 16:05:37 +0200 Subject: .copr/Makefile: Fix _sourcedir and rpmautospec --- .copr/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to '.copr/Makefile') diff --git a/.copr/Makefile b/.copr/Makefile index 94d6fda..7579fcb 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -1,16 +1,18 @@ spec ?= $(wildcard *.spec) +$(shell test -f $(spec)) +ifneq ($(.SHELLSTATUS),0) +override spec := $(wildcard $(spec)/*.spec) +endif 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) +srpm: $(spec) /usr/bin/spectool /usr/bin/rpmautospec + spectool -g $(spec) + sha512sum -c sources + rpmautospec process-distgit $(spec) $(spec) + rpmbuild -D "_srcrpmdir $(outdir)" -D "_sourcedir $(CURDIR)" -bs $(spec) .PHONY: srpm -- cgit v1.2.3