From 7d7a077361b8c0b08acc1c4e127bb8fde7ccb681 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Thu, 4 Apr 2024 01:14:47 +0200 Subject: .copr/Makefile: Fix rpmbuild _sourcedir --- .copr/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to '.copr/Makefile') diff --git a/.copr/Makefile b/.copr/Makefile index 94d6fda..45b6745 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -1,16 +1,17 @@ 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) + spectool -g $(spec) + sha512sum -c sources + rpmbuild -D "_srcrpmdir $(outdir)" -D "_sourcedir $(CURDIR)" -bs $(spec) .PHONY: srpm -- cgit v1.2.3