ebe16c
#
ebe16c
# Makefile
ebe16c
# Peter Jones, 2018-07-11 02:39
ebe16c
#
ebe16c
ebe16c
define get-config
ebe16c
$(shell git config --local --get "grub2.$(1)")
ebe16c
endef
ebe16c
ebe16c
FEDVER ?= $(call get-config, rebase.fedora-version)
ebe16c
ifeq ($(FEDVER),)
ebe16c
override FEDVER = 29
ebe16c
endif
ebe16c
ebe16c
ARCH ?=
ebe16c
ifneq ($(ARCH),)
ebe16c
override ARCH := $(foreach x,$(ARCH), --arch-override=$(x))
ebe16c
endif
ebe16c
ebe16c
# this is wacky because just using wildcard gets the list from before clean
ebe16c
# happens.
ebe16c
SOURCES ?= $(shell ls *.src.rpm)
ebe16c
ebe16c
all:
ebe16c
ebe16c
push :
ebe16c
	git push
ebe16c
ebe16c
clean :
ebe16c
	@rm -vf *.src.rpm
ebe16c
ebe16c
srpm : clean
ebe16c
	fedpkg srpm
ebe16c
ebe16c
scratch: srpm
ebe16c
	koji build --scratch ${ARCH} f${FEDVER} $(SOURCES)
ebe16c
ebe16c
release:
ebe16c
	fedpkg build --target f${FEDVER} ${ARCH}
ebe16c
ebe16c
rebase:
ebe16c
	./do-rebase --nocommit --nobumpspec f${FEDVER} ${REPO}
ebe16c
ebe16c
rpmspec:
ebe16c
	rpmspec -D "_sourcedir $(shell pwd)" -P grub2.spec
ebe16c
321567
rebuild: srpm
321567
	rpmbuild --rebuild $(SOURCES)
321567
ebe16c
local prep mockbuild compile :
ebe16c
	fedpkg $@
ebe16c
ebe16c
.PHONY: all push srpm scratch release rebase rpmspec local prep mockbuild compile clean
ebe16c
ebe16c
# vim:ft=make