2022-12-09 00:38:54 +00:00
|
|
|
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
|
2023-03-03 15:13:47 +00:00
|
|
|
SHA = $(PKGNAME)-$(version)-$(release)$(dist).$(ARCH).rpm.sha256
|
2022-12-09 00:38:54 +00:00
|
|
|
|
2023-03-03 15:13:47 +00:00
|
|
|
all: $(RPM)
|
2022-12-09 00:38:54 +00:00
|
|
|
|
|
|
|
$(RPM): $(SPECFILE) $(source)
|
|
|
|
rpmbuild -bb $<
|
|
|
|
|
|
|
|
$(source):
|
|
|
|
wget -O $@ $(sourceurl)
|
|
|
|
|
2023-03-03 15:13:47 +00:00
|
|
|
sign: $(RPM)
|
|
|
|
rpm --addsign $<
|
|
|
|
rpm -K $<
|
|
|
|
|
|
|
|
release: $(RPM) sign
|
|
|
|
sha256sum $< > $(SHA)
|
|
|
|
tea release create --draft --title "v$(version)" --tag v$(version) \
|
|
|
|
--asset $< --asset $(SHA)
|
|
|
|
|
2022-12-09 00:38:54 +00:00
|
|
|
clean:
|
2023-03-03 15:13:47 +00:00
|
|
|
rm $(RPM) $(source) $(SHA)
|
2022-12-09 00:38:54 +00:00
|
|
|
|
2023-03-03 15:13:47 +00:00
|
|
|
.PHONY: all clean sign release
|