From 949f4cb15dbea628c62fbed6c7d99f505c429c07 Mon Sep 17 00:00:00 2001 From: James Laska Date: Thu, 1 Oct 2015 12:06:01 -0400 Subject: [PATCH] Propagate necessary build changes from devel --- Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 922493be40..87cba45248 100644 --- a/Makefile +++ b/Makefile @@ -68,12 +68,14 @@ DEBUILD_BIN ?= debuild DEBUILD_OPTS = --source-option="-I" DPUT_BIN ?= dput DPUT_OPTS ?= -c .dput.cf -u +REPREPRO_BIN ?= reprepro +REPREPRO_OPTS ?= -b reprepro --export=force +DEB_DIST ?= ifeq ($(OFFICIAL),yes) - DEB_DIST ?= stable # Sign official builds DEBUILD_OPTS += -k$(GPG_KEY) + REPREPRO_OPTS += --ask-passphrase else - DEB_DIST ?= unstable # Do not sign development builds DEBUILD_OPTS += -uc -us endif @@ -194,6 +196,13 @@ clean: clean-rpm clean-deb clean-grunt clean-ui clean-tar clean-packer clean-bun rm -rf build $(NAME)-$(VERSION) *.egg-info find . -type f -regex ".*\.py[co]$$" -delete +# convenience target to assert environment variables are defined +guard-%: + @if [ "${${*}}" == "" ]; then \ + echo "The required environment variable '$*' is not set"; \ + exit 1; \ + fi + # Fetch from origin, rebase local commits on top of origin commits. rebase: git pull --rebase origin master @@ -560,7 +569,7 @@ deb-build/$(DEB_NVRA).deb: deb-build/$(DEB_NVR).dsc $(PBUILDER_CACHE_DIR)/$(DEB_ $(PBUILDER_BIN) execute $(PBUILDER_OPTS) --save-after-exec packaging/pbuilder/setup.sh $(DEB_DIST) $(PBUILDER_BIN) build $(PBUILDER_OPTS) deb-build/$(DEB_NVR).dsc -deb: deb-build/$(DEB_NVRA).deb +deb: guard-DEB_DIST deb-build/$(DEB_NVRA).deb @echo "#############################################" @echo "Artifacts:" @echo deb-build/$(DEB_NVRA).deb @@ -582,17 +591,17 @@ reprepro/conf: mkdir -p $@ cp -a packaging/reprepro/* $@/ if [ "$(OFFICIAL)" = "yes" ] ; then \ - echo "ask-passphrase" >> $@/options; \ sed -i -e 's|^\(Codename:\)|SignWith: $(GPG_KEY)\n\1|' $@/distributions ; \ fi reprepro: deb-build/$(DEB_NVRA).deb reprepro/conf - reprepro --export=force -b $@ clearvanished - for COMPONENT in non-free ; do \ - reprepro --export=force -b $@ -C $$COMPONENT remove $(DEB_DIST) $(NAME) ; \ - reprepro --export=force -b $@ --keepunreferencedfiles --ignore=brokenold -C $$COMPONENT includedeb $(DEB_DIST) deb-build/$(DEB_NVRA).deb ; \ + $(REPREPRO_BIN) $(REPREPRO_OPTS) clearvanished + for COMPONENT in non-free $(VERSION); do \ + $(REPREPRO_BIN) $(REPREPRO_OPTS) -C $$COMPONENT remove $(DEB_DIST) $(NAME) ; \ + $(REPREPRO_BIN) $(REPREPRO_OPTS) -C $$COMPONENT --keepunreferencedfiles --ignore=brokenold includedeb $(DEB_DIST) deb-build/$(DEB_NVRA).deb ; \ done + # # Packer build targets #