[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: gnu: ardour: Add a phase to install Freedesktop files.
From: |
guix-commits |
Subject: |
01/03: gnu: ardour: Add a phase to install Freedesktop files. |
Date: |
Mon, 24 Dec 2018 05:08:46 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit ff46016e9040f6265e9875b07d362a787e1765b9
Author: Brendan Tildesley <address@hidden>
Date: Fri Dec 7 22:00:14 2018 +1100
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 <address@hidden>
---
gnu/packages/audio.scm | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 2786f62..d3d1dcd 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2018 Marius Bakke <address@hidden>
;;; Copyright © 2018 Thorsten Wilms <address@hidden>
;;; Copyright © 2018 Eric Bavier <address@hidden>
+;;; Copyright © 2018 Brendan Tildesley <address@hidden>
;;;
;;; 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