about summary refs log tree commit homepage
path: root/install/os.perl
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-12-13 00:50:14 +0000
committerEric Wong <e@80x24.org>2023-12-13 09:01:52 +0000
commitce3b046e5f34e48d799118c5607e732a69a884b3 (patch)
treebc544da5f18056894952578dd97e634e01257019 /install/os.perl
parentdca4be1b7b77bd5d893ca167c8adc8a128f7b847 (diff)
downloadpublic-inbox-ce3b046e5f34e48d799118c5607e732a69a884b3.tar.gz
Somewhat surprising that BSD::Resource hasn't been packaged for
Alpine, but otherwise pretty straightforward mapping with some
dependencies filled in manually.
Diffstat (limited to 'install/os.perl')
-rw-r--r--install/os.perl12
1 files changed, 9 insertions, 3 deletions
diff --git a/install/os.perl b/install/os.perl
index bf5c55c2..00edbadf 100644
--- a/install/os.perl
+++ b/install/os.perl
@@ -50,8 +50,13 @@ EOM
         die "$^O unsupported";
 }
 $VERSION_ID //= 0; # numeric? could be 'sid', actually...
-my %MIN_VER = (freebsd => v11, openbsd => v7.3, netbsd => v9.3,
-        dragonfly => v6.4);
+my %MIN_VER = ( # likely older versions work for many of these...
+        alpine => v3.19,
+        dragonfly => v6.4,
+        freebsd => v11,
+        netbsd => v9.3,
+        openbsd => v7.3,
+);
 
 if (defined(my $min_ver = $MIN_VER{$^O})) {
         my $vid = $VERSION_ID;
@@ -64,7 +69,8 @@ EOM
 }
 
 sub pkg_fmt () {
-        if ($ID =~ /\A(?:freebsd|dragonfly)\z/) { 'pkg' }
+        if ($ID eq 'alpine') { 'apk' }
+        elsif ($ID =~ /\A(?:freebsd|dragonfly)\z/) { 'pkg' }
         # *shrug*, as long as the (Net|Open)BSD names don't conflict w/ FreeBSD
         elsif ($ID eq 'netbsd') { 'pkgin' }
         elsif ($ID eq 'openbsd') { 'pkg_add' }