aboutsummaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-24 14:48:00 -0300
committerEuAndreh <eu@euandre.org>2023-03-24 14:48:03 -0300
commit1dd95f5355481448a86ea7d10e6f470492ef2c6a (patch)
tree4df726fd740629f251fbd090e2dfcc6b18555706 /src/bin
parentMakefile: Split Guix tests from build (diff)
downloadpackage-repository-1dd95f5355481448a86ea7d10e6f470492ef2c6a.tar.gz
package-repository-1dd95f5355481448a86ea7d10e6f470492ef2c6a.tar.xz
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.
Diffstat (limited to 'src/bin')
-rwxr-xr-xsrc/bin/paku.in29
1 files changed, 22 insertions, 7 deletions
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\"";