diff mbox series

[bug#63721,2/2] gnu: mpd: Split outputs.

Message ID cc7fe25fd94f6a77c2a7e41ae353a15968208e0e.1685035302.git.mirai@makinata.eu
State New
Headers show
Series MPD update & fixes | expand

Commit Message

Bruno Victal May 25, 2023, 5:21 p.m. UTC
The HTML manual accounts for more than 40% of the package size.

* gnu/packages/mpd.scm (mpd)[outputs]: Add 'html' output.
[arguments]: Add split-package phase.
---
 gnu/packages/mpd.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Liliana Marie Prikler May 25, 2023, 7:47 p.m. UTC | #1
Am Donnerstag, dem 25.05.2023 um 18:21 +0100 schrieb Bruno Victal:
> The HTML manual accounts for more than 40% of the package size.
> 
> * gnu/packages/mpd.scm (mpd)[outputs]: Add 'html' output.
> [arguments]: Add split-package phase.
Prefer “doc” as a separate output, as the logic for that is mostly
there already.  Or use “doc” and “doc-html” if you really must.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 3259217989..fa16e60484 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -146,7 +146,16 @@  (define-public mpd
                 (("systemd_dep = declare_dependency" all)
                  (string-append "_" all)))
               (substitute* "meson.build"
-                (("systemd_dep,") "systemd_dep, _systemd_dep,")))))))
+                (("systemd_dep,") "systemd_dep, _systemd_dep,"))))
+          (add-after 'install 'split-package
+            (lambda _
+              ;; The HTML manual accounts for over 40% of the disk
+              ;; space used by the package.
+              (let* ((path   "/share/doc/mpd/html")
+                     (htmldir  (string-append #$output path))
+                     (htmldir* (string-append #$output:html path)))
+                (mkdir-p (dirname htmldir*))
+                (rename-file htmldir htmldir*)))))))
     (inputs (append
              (if (target-linux?) (list liburing) '())
              (list ao
@@ -189,6 +198,7 @@  (define-public mpd
                          ;;
                          ;; Used when zziplib feature is enabled.
                          zip))
+    (outputs (list "out" "html"))
     ;; Missing optional inputs:
     ;;   libcdio_paranoia
     ;;   libmms