From 9a4ae96b970ab97c51a70298cd421ef100e7d39c Mon Sep 17 00:00:00 2001 From: bill-auger Date: Tue, 2 Aug 2022 23:38:26 -0400 Subject: housekeeping --- bin/pacman-make-keyring | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/bin/pacman-make-keyring b/bin/pacman-make-keyring index 9b1109c..92ebff1 100755 --- a/bin/pacman-make-keyring +++ b/bin/pacman-make-keyring @@ -1,7 +1,8 @@ #!/usr/bin/make -rRf -# Usage: pacman-make-keyring V=$(date -u +%Y%m%d) +# Usage: pacman-make-keyring V=$(date -u +%Y%m%d) [ keyserver= ] -# Copyright 2014, 2016 Luke Shumaker . +# Copyright 2014,2016 Luke Shumaker +# Copyright 2021-2022 bill-auger # # This is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -17,20 +18,26 @@ # License along with this manual; if not, see # . + +# apply config +KEYRING_NAME = parabola +bin := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) +yamldir := $(shell ruby -e "load '$(bin)/common.rb'; print cfg['yamldir']") +cachedir := $(shell ruby -e "load '$(bin)/common.rb'; print cfg['keyring_cachedir']") +outputdir = $(cachedir)/$(KEYRING_NAME)-keyring-$(V) + +# sanity checks ifeq ($(origin V),undefined) -$(info Usage: pacman-make-keyring V=$$(date -u +%Y%m%d)) -$(error You must set V= on the command line) + $(info Usage: pacman-make-keyring V=$$(date -u +%Y%m%d) [ keyserver= ]) $(info) + $(error V= must be set in the environment, on the command line, etc) endif ifeq ($(origin keyserver),undefined) -keyserver = hkp://pgp.cyberbits.eu:11371 + keyserver := hkp://pgp.cyberbits.eu:11371 +endif +ifneq ($(findstring hkp://,${keyserver}),hkp://) + $(error keyserver must be a valid hkp:// URL) endif - -bin := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) -yamldir := $(shell ruby -e "load '$(bin)/common.rb'; print cfg['yamldir']") -cachedir := $(shell ruby -e "load '$(bin)/common.rb'; print cfg['keyring_cachedir']") -outputdir = $(cachedir)/$(KEYRING_NAME)-keyring-$(V) -KEYRING_NAME = parabola all: $(KEYRING_NAME)-keyring-$(V).tar.gz .PHONY: all -- cgit v1.2.2