From fe6ccb855234111cfe2460bb2469bc7b766e534e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 5 Apr 2020 22:24:19 -0400 Subject: gnu: mediastreamer2: Move the tester files and HTML doc to separate outputs. The tester binary generated gets installed with about 20 MiB of data files, and the HTML documentation weighs another 500 KiB or so. Move them to separate outputs. * gnu/packages/patches/mediastreamer-srtp2.patch: Rename to... * gnu/packages/patches/mediastreamer2-srtp2.patch: ...this, to please 'guix lint'. * gnu/local.mk (dist_patch_DATA): Adapt. * gnu/packages/linphone.scm (mediastreamer2)[patches]: Likewise. [outputs]: Add the "doc" and "tester" outputs. [phases]: Add a phase to move the HTML doc and tester binary and data to the 'doc' and 'tester' outputs, respectively. [description]: Remove the unicode characters surrounding the word 'powerful'. --- gnu/packages/linphone.scm | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'gnu/packages/linphone.scm') diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm index ab223700d5..50d75a4a95 100644 --- a/gnu/packages/linphone.scm +++ b/gnu/packages/linphone.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; ;;; Copyright © 2020 Raghav Gururajan +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -324,8 +325,8 @@ (define-public mediastreamer2 "mediastreamer/mediastreamer-" version ".tar.gz")) (sha256 (base32 "0whpqr69wz0pnzvragkpfblxhd0rds8k06c3mw5a0ag216a1yd9k")) - (patches - (list (search-patch "mediastreamer-srtp2.patch"))))) + (patches (search-patches "mediastreamer2-srtp2.patch")))) + (outputs '("out" "doc" "tester")) (build-system cmake-build-system) (arguments `(#:tests? #f ; No test target @@ -335,7 +336,33 @@ (define-public mediastreamer2 "-DENABLE_STRICT=NO" ; Would otherwise treat warnings as err "-DENABLE_BV16=NO" ; Not available "-DCMAKE_C_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"" - "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\""))) + "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"") + #:phases + (modify-phases %standard-phases + (add-after 'install 'separate-outputs + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc")) + (tester (assoc-ref outputs "tester")) + (tester-name (string-append ,name "_tester"))) + ;; Copy the tester executable. + (mkdir-p (string-append tester "/bin")) + (rename-file (string-append out "/bin/" tester-name) + (string-append tester "/bin/" tester-name)) + ;; Copy the tester data files. + (copy-recursively (string-append out "/share/" tester-name) + (string-append tester "/share/" tester-name)) + (delete-file-recursively (string-append out "/share/" + tester-name)) + ;; Copy the HTML documentation. + (copy-recursively (string-append out "/share/doc/" + ,name "-" ,version "/html") + (string-append doc "/share/doc/" + ,name "-" ,version "/html")) + (delete-file-recursively (string-append out "/share/doc/" + ,name "-" ,version + "/html")) + #t)))))) (native-inputs `(("dot" ,graphviz) ("doxygen" ,doxygen) @@ -368,10 +395,11 @@ (define-public mediastreamer2 ("xv" ,libxv) ("zrtp", bzrtp))) (synopsis "Belledonne Communications Streaming Engine") - (description "Mediastreamer is a powerful and lightweight streaming -engine for telephony applications. This media processing and streaming toolkit -is responsible for receiving and sending all multimedia streams in Linphone, -including media capture, encoding and decoding, and rendering.") + (description "Mediastreamer2 is a powerful and lightweight +streaming engine for telephony applications. This media processing +and streaming toolkit is responsible for receiving and sending all +multimedia streams in Linphone, including media capture, encoding and +decoding, and rendering.") (home-page "https://gitlab.linphone.org/BC/public/mediastreamer2") (license license:gpl2+))) -- cgit v1.2.3