GNU bug report logs -
#34576
Calibre: Add icon and desktop file to Calibre
Previous Next
Reported by: <pkill9 <at> runbox.com>
Date: Tue, 19 Feb 2019 18:27:02 UTC
Severity: normal
Done: Michael Rohleder <mike <at> rohleder.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
I've attached a patch with the 'let' removed from the icon install phase, but I haven't changed the indentation of the desktop file because when I did that it added a blank line at the beginning of the desktop file and created a large indentation before '[Desktop Entry]'. I moved 'out' to be next to the last line of the desktop file output.
> Secondly, the indentation is odd. I’d write it like this:
>
> (format #t "\
> [Desktop Entry]~@
> Name=…
> Comment=…
> …
> Type=Application~%" out)
>
>
> --
I used the xonotic package definition as a reference for thi part, and emacs' `indent-region` indents it like this. I don't know how it should look. I've attached a patch for now.
On Tue, 19 Feb 2019 22:26:35 +0100, Ricardo Wurmus <rekado <at> elephly.net> wrote:
>
> Hi pkill9,
>
> > + (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))
>
> You can do without “let*” here.
>
> > + (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)))
>
> Does upstream not provide a desktop file? I’d rather see this submitted
> to upstream. Have you contacted the developers about this?
>
> Secondly, the indentation is odd. I’d write it like this:
>
> (format #t "\
> [Desktop Entry]~@
> Name=…
> Comment=…
> …
> Type=Application~%" out)
>
>
> --
> Ricardo
[0001-gnu-calibre-Add-desktop-file-and-icon.patch (text/x-patch, attachment)]
This bug report was last modified 4 years and 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.