30 lines
750 B
Makefile
30 lines
750 B
Makefile
PKGNAME = uacme
|
|
SPECFILE = $(PKGNAME).spec
|
|
ARCH = $(shell rpm --eval "%{_arch}")
|
|
RPMBUILD = $(shell rpm --eval "%{_builddir}")
|
|
RPMSOURCE = $(shell rpm --eval "%{_sourcedir}")
|
|
RPMDIR = $(shell rpm --eval "%{_rpmdir}")
|
|
|
|
version = $(shell egrep "^Version" $(SPECFILE) | awk '{ print $$2}')
|
|
release = $(shell egrep "^Release" $(SPECFILE) | awk '{ print $$2}')
|
|
|
|
sourceurl = https://github.com/ndilieto/uacme/archive/refs/tags/upstream/$(version).tar.gz
|
|
source = $(RPMSOURCE)/$(version).tar.gz
|
|
|
|
RPM = $(RPMDIR)/$(ARCH)/$(PKGNAME)-$(version)-$(release).$(ARCH).rpm
|
|
|
|
sign: $(RPM)
|
|
rpm --addsign $<
|
|
rpm -K $<
|
|
sha256sum $<
|
|
|
|
$(RPM): $(SPECFILE) $(source)
|
|
rpmbuild -bb $<
|
|
|
|
$(source):
|
|
wget -O $@ $(sourceurl)
|
|
|
|
clean:
|
|
rm $(RPM) $(source)
|
|
|
|
.PHONY: clean sign
|