From: Jakub Jirutka <jakub@jirutka.cz>
Date: Tue, 23 Aug 2017 22:57:00 +0200
Date: Sat, 31 Jul 2021 16:02:04 +0200
Date: Tue, 02 Apr 2024 22:31:52 +0200
Subject: [PATCH] Patch niminst's (de)install paths to be FHS/Alpine compliant

--- a/tools/niminst/install.nimf
+++ b/tools/niminst/install.nimf
@@ -32,9 +32,9 @@
       bindir=$1
       configdir="/etc/?proj"
       libdir="/usr/lib/?proj"
-      docdir="/usr/share/?proj/doc"
+      docdir="/usr/share/doc/?proj"
       datadir="/usr/share/?proj/data"
-      nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
+      nimbleDir="/usr/share/nimble/pkgs/?c.nimblePkgName-?c.version"
       ;;
     "/usr/local/bin")
       bindir=$1
@@ -42,7 +42,7 @@
       libdir="/usr/local/lib/?proj"
       docdir="/usr/local/share/?proj/doc"
       datadir="/usr/local/share/?proj/data"
-      nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
+      nimbleDir="/usr/local/share/nimble/pkgs/?c.nimblePkgName-?c.version"
       ;;
     "/opt")
       bindir="/opt/?proj/bin"
--- a/tools/niminst/deinstall.nimf
+++ b/tools/niminst/deinstall.nimf
@@ -19,17 +19,17 @@ if [ $# -eq 1 ] ; then
       bindir=/usr/bin
       configdir=/etc/?proj
       libdir=/usr/lib/?proj
-      docdir=/usr/share/?proj/doc
+      docdir=/usr/share/doc/?proj
       datadir=/usr/share/?proj/data
-      nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
+      nimbleDir="/usr/share/nimble/pkgs/?c.nimblePkgName-?c.version"
       ;;
     "/usr/local/bin")
       bindir=/usr/local/bin
       configdir=/etc/?proj
       libdir=/usr/local/lib/?proj
-      docdir=/usr/local/share/?proj/doc
+      docdir=/usr/local/share/doc/?proj
       datadir=/usr/local/share/?proj/data
-      nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version"
+      nimbleDir="/usr/local/share/nimble/pkgs/?c.nimblePkgName-?c.version"
       ;;
     "/opt")
       bindir="/opt/?proj/bin"
