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
Message #11 received at 34576 <at> debbugs.gnu.org (full text, mbox):
Hi Ricardo,
> Does upstream not provide a desktop file? I’d rather see this submitted
> to upstream. Have you contacted the developers about this?
It looks like it does provide a desktop file looking at this pull request: https://github.com/kovidgoyal/calibre/pull/739, which modifies this file (link to line showing desktop file): https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py#L1031
It's created using a Python script though, perhaps it doesn't get run during building?
I thought the developer wouldn't add it upstream because I remember investigating a long time ago and finding the developer writing somewhere that they wouldn't add a desktop file upstream and that it was the linux packager's job to do that, maybe I am mis-remembering or it was in some other context.
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
This bug report was last modified 4 years and 234 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.