From ff46016e9040f6265e9875b07d362a787e1765b9 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Fri, 7 Dec 2018 22:00:14 +1100 Subject: gnu: ardour: Add a phase to install Freedesktop files. * gnu/packages/audio.scm (ardour): [arguments]: - Correct comment about --freedesktop flag. - Adjust pretty printing for consistency. - Add 'install-free-desktop-files phase to actually install the files that were build. Fixes bug#33585 reported by baconicsynergy. Signed-off-by: Efraim Flashner --- gnu/packages/audio.scm | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'gnu/packages/audio.scm') diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 2786f62163..d3d1dcd02c 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2018 Thorsten Wilms ;;; Copyright © 2018 Eric Bavier +;;; Copyright © 2018 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -229,13 +230,34 @@ namespace ARDOUR { const char* revision = \"" version "\" ; }")) (arguments `(#:configure-flags '("--cxx11" ; required by gtkmm "--no-phone-home" ; don't contact ardour.org - "--freedesktop" ; install .desktop file + "--freedesktop" ; build .desktop file "--test") ; build unit tests #:phases (modify-phases %standard-phases - (add-after - 'unpack 'set-rpath-in-LDFLAGS - ,(ardour-rpath-phase (version-major version)))) + (add-after 'unpack 'set-rpath-in-LDFLAGS + ,(ardour-rpath-phase (version-major version))) + (add-after 'install 'install-freedesktop-files + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (share (string-append out "/share")) + (ver ,(version-major version))) + (for-each + (lambda (size) + (let ((dir (string-append share "/icons/hicolor/" + size "x" size "/apps"))) + (mkdir-p dir) + (copy-file + (string-append "gtk2_ardour/resources/Ardour-icon_" + size "px.png") + (string-append dir "/ardour" ver ".png")))) + '("16" "22" "32" "48" "256")) + (install-file (string-append "build/gtk2_ardour/ardour" + ver ".desktop") + (string-append share "/applications/")) + (install-file (string-append "build/gtk2_ardour/ardour" + ver ".appdata.xml") + (string-append share "/appdata/"))) + #t))) #:test-target "test" #:python ,python-2)) (inputs -- cgit v1.2.3