aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorBrendan Tildesley <brendan.tildesley@openmailbox.org>2018-12-07 22:00:14 +1100
committerEfraim Flashner <efraim@flashner.co.il>2018-12-24 12:04:02 +0200
commitff46016e9040f6265e9875b07d362a787e1765b9 (patch)
tree4ffb107cb2a4dcf9582a7de207349563dce3d335 /gnu/packages
parentdcad57d5fca43a111e1b314264171c80d4d9a75b (diff)
downloadpatches-ff46016e9040f6265e9875b07d362a787e1765b9.tar
patches-ff46016e9040f6265e9875b07d362a787e1765b9.tar.gz
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 <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/audio.scm30
1 files changed, 26 insertions, 4 deletions
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 <mbakke@fastmail.com>
;;; Copyright © 2018 Thorsten Wilms <t_w_@freenet.de>
;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
;;;
;;; 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