From: <pkill9@runbox.com>
To: 34576@debbugs.gnu.org
Subject: [bug#34576] Calibre: Add icon and desktop file to Calibre
Date: Tue, 19 Feb 2019 18:26:27 +0000 (GMT) [thread overview]
Message-ID: <E1gwA67-0001RN-Er@rmmprod05.runbox> (raw)
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
This patch adds two phases to the package definition for Calibre that install an icon and install a desktop file.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-calibre-Add-icon-and-desktop-file.patch --]
[-- Type: text/x-patch; name="0001-gnu-calibre-Add-icon-and-desktop-file.patch", Size: 2169 bytes --]
From 894a471083105a182d548c2b80effb0eb70c8fa6 Mon Sep 17 00:00:00 2001
From: Pkill -9 <pkill9@runbox.com>
Date: Tue, 19 Feb 2019 18:23:37 +0000
Subject: [PATCH] gnu: calibre: Add icon and desktop file.
* gnu/packages/ebook.scm (calibre): Add icon and desktop file.
---
gnu/packages/ebook.scm | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 99e49bc17..ae899e04b 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -185,7 +185,32 @@
(setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo"))
(setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))
#t)))
- (add-after 'install 'install-font-liberation
+ (add-after 'install 'install-icon
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (install-file "imgsrc/calibre.svg"
+ (string-append out
+ "/share/icons/hicolor/scalable/apps")))
+ #t))
+ (add-after 'install-icon 'install-desktop-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/share/applications"))
+ (with-output-to-file
+ (string-append out "/share/applications/calibre.desktop")
+ (lambda _
+ (format #t
+ "[Desktop Entry]~@
+ Name=Calibre~@
+ Comment=E-book organiser and reader~@
+ Exec=~a/bin/calibre~@
+ TryExec=~@*~a/bin/calibre~@
+ Icon=calibre~@
+ Categories=Office~@
+ Type=Application~%"
+ out)))
+ #t)))
+ (add-after 'install-desktop-file 'install-font-liberation
(lambda* (#:key inputs outputs #:allow-other-keys)
(for-each (lambda (file)
(install-file file (string-append
--
2.20.1
next reply other threads:[~2019-02-19 18:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 18:26 pkill9 [this message]
2019-02-19 21:26 ` [bug#34576] Calibre: Add icon and desktop file to Calibre Ricardo Wurmus
2019-02-20 4:30 ` pkill9
2019-02-20 5:00 ` Brett Gilio
2019-02-20 5:06 ` pkill9
2019-02-20 14:08 ` Tobias Geerinckx-Rice
2019-02-20 14:25 ` Tobias Geerinckx-Rice
2020-10-01 3:18 ` bug#34576: " Michael Rohleder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1gwA67-0001RN-Er@rmmprod05.runbox \
--to=pkill9@runbox.com \
--cc=34576@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.