From 1dd95f5355481448a86ea7d10e6f470492ef2c6a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 24 Mar 2023 14:48:00 -0300 Subject: src/bin/paku.in: Emit Makefile for generating $NAME.key for Guix channel Instead of doing it inline in the Makefile with clever Perl one-liners. BONUS: add missing ".POSIX:" to the debian.mk file. --- src/bin/paku.in | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/bin/paku.in b/src/bin/paku.in index 6cb550d..4d92d9b 100755 --- a/src/bin/paku.in +++ b/src/bin/paku.in @@ -32,6 +32,7 @@ sub help($fh) { - debian - nix - html + - guix-channel-key Generate package definitions for different package managers. @@ -343,6 +344,18 @@ sub emit_guix() { print ")\n"; } +sub emit_guix_channel_key() { + my $json = load_json(); + my $name = $json->{maintainer}{name}; + my $id = $json->{maintainer}{email}; + print <<~EOF; + .POSIX: + + $name.key: + gpg --armour --export $id > \$\@ + EOF +} + sub emit_debian() { my $json = load_json(); my @debs = ("debs = \\\n"); @@ -416,6 +429,7 @@ sub emit_debian() { } + print ".POSIX:\n\n"; print "DIR = $dir\n\n"; print @debs, "\n"; print <<~EOF; @@ -736,13 +750,14 @@ sub emit_html() { my %actions = ( - 'debian-packages' => \&emit_packages, - 'debian-release' => \&emit_release, - nix => \&emit_nix, - guix => \&emit_guix, - debian => \&emit_debian, - homebrew => \&emit_homebrew, - html => \&emit_html, + 'debian-packages' => \&emit_packages, + 'debian-release' => \&emit_release, + nix => \&emit_nix, + guix => \&emit_guix, + 'guix-channel-key' => \&emit_guix_channel_key, + debian => \&emit_debian, + homebrew => \&emit_homebrew, + html => \&emit_html, ); my $fn = $actions{$action} or die "Unknown ACTION: \"$action\""; -- cgit v1.2.3