From c0e4b5f65fc8255a5fa338b999edca72e92cfa74 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 24 Mar 2023 12:15:38 -0300 Subject: Makefile: Derive "EuAndreh.key" from paku.lock file --- .gitignore | 1 + Makefile | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index a71d517..e0369b0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /debian.mk /public/ /src/bin/paku +/*.sentinel diff --git a/Makefile b/Makefile index 6e30e3b..1205ac4 100644 --- a/Makefile +++ b/Makefile @@ -12,15 +12,12 @@ -all: EuAndreh.key guix nix debian homebrew src/bin/paku +all: guix nix debian homebrew src/bin/paku paku.lock: src/bin/paku Makefile touch $@ -EuAndreh.key: paku.lock - gpg --armour --export eu@euandre.org > $@ - test-config-files = \ tests/internet/etc/postfix/main.cf \ @@ -30,8 +27,14 @@ test-config-files = \ derived-assets = \ $(test-config-files) \ -guix: src/org/euandre/packages.scm result-packages.sentinel \ - result-services.sentinel +guix: src/org/euandre/packages.scm channel-key.sentinel \ + result-packages.sentinel result-services.sentinel + +channel-key.sentinel: paku.lock + F="$$( perl -MJSON -0777 -E 'say $${decode_json <>}{maintainer}{name}' < paku.lock).key"; \ + ID="$$(perl -MJSON -0777 -E 'say $${decode_json <>}{maintainer}{email}' < paku.lock)"; \ + gpg --armour --export "$$ID" > "$$F" + touch $@ src/org/euandre/packages.scm: paku.lock paku guix > src/org/euandre/packages.scm @@ -113,7 +116,7 @@ upload: public clean: rm -rf \ $(derived-assets) result* .paku/ public/ debian.mk \ - src/bin/paku \ + src/bin/paku *.sentinel \ HTTP-REMOTE = 'https://euandre.org/s/package-repository' -- cgit v1.2.3