blob: 94d6fdadd44f167fc974f217b8a7368a4cf3878e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 $@
|