From patchwork Tue Feb 19 18:26:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pkill9 X-Patchwork-Id: 1196 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9669916C67; Tue, 19 Feb 2019 18:28:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 3B2C116C65 for ; Tue, 19 Feb 2019 18:28:45 +0000 (GMT) Received: from localhost ([127.0.0.1]:53363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwA8K-0004EA-JT for patchwork@mira.cbaines.net; Tue, 19 Feb 2019 13:28:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwA6h-0002z0-A2 for guix-patches@gnu.org; Tue, 19 Feb 2019 13:27:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwA6g-0002ty-H8 for guix-patches@gnu.org; Tue, 19 Feb 2019 13:27:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwA6g-0002tr-Cq for guix-patches@gnu.org; Tue, 19 Feb 2019 13:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gwA6g-0006hG-7z for guix-patches@gnu.org; Tue, 19 Feb 2019 13:27:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34576] Calibre: Add icon and desktop file to Calibre Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34576 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 34576@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches" Received: via spool by submit@debbugs.gnu.org id=B.155060081725729 (code B ref -1); Tue, 19 Feb 2019 18:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Feb 2019 18:26:57 +0000 Received: from localhost ([127.0.0.1]:55529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwA6a-0006gv-NK for submit@debbugs.gnu.org; Tue, 19 Feb 2019 13:26:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwA6Y-0006gj-O7 for submit@debbugs.gnu.org; Tue, 19 Feb 2019 13:26:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:56758) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwA6Q-0002oX-LB for submit@debbugs.gnu.org; Tue, 19 Feb 2019 13:26:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwA6P-0002iN-Pt for guix-patches@gnu.org; Tue, 19 Feb 2019 13:26:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwA6O-0002ne-Me for guix-patches@gnu.org; Tue, 19 Feb 2019 13:26:45 -0500 Received: from aibo.runbox.com ([91.220.196.211]:35974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwA6N-0002jg-QD for guix-patches@gnu.org; Tue, 19 Feb 2019 13:26:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Message-Id:Content-Type:Date:Subject:To:From:MIME-Version; bh=/rbKzKm4Fg+F6fE+xvCTwkAmdIbeLqXlIIevt1OHxEU=; b=NDH1zWwwIElYsg9weYE1DZ6Dc ymd4vtwz4qEPiqV997xeHlVj16vcjIj3hryF+q1Rgr0Rvp6/5G20QS+UoS+gyuepMQhxRs84Py5Ot K5XOtMlQN02HyGrf3DpFKJJRcM5TExnFfb6fFSt9ifSL7Bx0AGzEVcjKeOUqD3aIEt/sfc9eGXhzC qXZNoqy9Mnc3l7fVmFBLOGjoxJFfurhNiTrT9xXSEaGuhMb0wwlVr5ovkDt7LB1fTgGRvBMjNnVTB HhN6mJXH9loT5k0JxgPLx9vCbA69Le8nCAKmTvX3XlQKdWeNkO3MY7TGefsvY+CgNW2cEwGOgirMu 6EiZSChnQ==; Received: from [10.9.9.127] (helo=rmmprod05.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1gwA67-0004Qf-FW for guix-patches@gnu.org; Tue, 19 Feb 2019 19:26:27 +0100 Received: from mail by rmmprod05.runbox with local (Exim 4.86_2) (envelope-from ) id 1gwA67-0001RN-Er for guix-patches@gnu.org; Tue, 19 Feb 2019 19:26:27 +0100 MIME-Version: 1.0 Received: from [Authenticated user (850733)] by runbox.com with http (RMM6); for ; Tue, 19 Feb 2019 18:26:27 GMT From: Date: Tue, 19 Feb 2019 18:26:27 +0000 (GMT) X-Mailer: RMM6 Message-Id: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This patch adds two phases to the package definition for Calibre that install an icon and install a desktop file. From 894a471083105a182d548c2b80effb0eb70c8fa6 Mon Sep 17 00:00:00 2001 From: Pkill -9 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