unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: 63721@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>, liliana.prikler@gmail.com
Subject: [bug#63721] [PATCH v2 2/2] gnu: mpd: Split outputs.
Date: Fri, 26 May 2023 08:06:21 +0100	[thread overview]
Message-ID: <f00fb00bc933d03103927c449744b0099666c951.1685084781.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1685034837.git.mirai@makinata.eu>

The HTML manual accounts for more than 40% of the package size.

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

diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 3259217989..d4654d4842 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:doc 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" "doc"))
     ;; Missing optional inputs:
     ;;   libcdio_paranoia
     ;;   libmms
-- 
2.39.2





      parent reply	other threads:[~2023-05-26  7:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 17:20 [bug#63721] [PATCH 0/2] MPD update & fixes Bruno Victal
2023-05-25 17:21 ` [bug#63721] [PATCH 1/2] gnu: mpd: Update to 0.23.13 Bruno Victal
2023-05-25 17:21 ` [bug#63721] [PATCH 2/2] gnu: mpd: Split outputs Bruno Victal
2023-05-25 19:47   ` Liliana Marie Prikler
2023-05-26  7:06 ` [bug#63721] [PATCH v2 1/2] gnu: mpd: Update to 0.23.13 Bruno Victal
2023-05-26  7:06 ` Bruno Victal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f00fb00bc933d03103927c449744b0099666c951.1685084781.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=63721@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).