# Clifford Beshers <beshers@seereason.org>

# This file may not work straight out, but will act as a guideline
# for anyone creating keys for signing things.
#
# I created a gpg key with no expiration date and the following name:
#
# pub   1024D/0521D8B0 2007-10-21
# uid                  SeeReason Partners, LLC <logic@seereason.org>
# sub   2048g/31B05755 2007-10-21
#
# All of the Debian keys have a Comment field (in parens in the email line) with the substring 'Archive Automatic'.
# I export all keys that match that phrase.  No keys have been removed, so that file is empty for now.
# The md5sums.txt file is really the ascii clearsigned file with the md5sums as input.  Not sure it is actually
# used by anything programmatic.


KEYRING=keyrings/seereason-keyring.gpg
REMOVED_KEYS=keyrings/seereason-removed-keys.gpg


md5sums.txt: $(KEYRING) $(REMOVED_KEYS)
	# This will prompt for a passphrase
	md5sum $? | gpg --clearsign - >md5sums.txt

keyrings:: $(KEYRING) $(REMOVED_KEYS)
$(KEYRING):
	NAMES=$$(gpg --list-keys | grep -B1 'Archive Automatic' | awk '{print $2; exit 0}' | sed -e 's#^.*/##') \
	gpg --export $(NAMES) >$@

$(REMOVED_KEYS):
	# This is an emptfy file for now.
	: >$@
