[texworks] PAtch for .desktop file and building texworks Rev720 with libqt4 < 4.7

Atri badshah400 at aim.com
Fri Dec 10 11:12:06 CET 2010


On Thu, 2010-12-09 at 08:01 +0100, Stefan Löffler wrote:
> Hi,
> 
> On 2010-12-09 05:29, Atri wrote:
> > Also, I use a patch to fix little complaints in the .desktop file
> > reported by RPMLint when it looks for problems with a built rpm package.
> > This patch removes the first shebang line from the .desktop file and
> > completes the Categories definition in it. Here's the patch
> >
> > ----------------------------------------------------------
> > diff -ur texworks-0.2.99svn702.orig//texworks.desktop
> > texworks-0.2.99svn702//texworks.desktop
> > --- texworks-0.2.99svn702.orig//texworks.desktop  2010-12-04
> > 04:10:09.000000000 +0530
> > +++ texworks-0.2.99svn702//texworks.desktop   2010-12-04
> > 06:25:09.694082023 +0530
> > @@ -1,4 +1,3 @@
> > -#!/usr/bin/env xdg-open
> >  [Desktop Entry]
> >  Type=Application
> >  Version=1.0
> > @@ -10,6 +9,5 @@
> >  Comment[de]=TeX Dokumente einfach bearbeiten, setzen und betrachten
> >  Icon=TeXworks
> >  Exec=texworks %F
> > -MimeType=text/x-tex;application/pdf;
> > -Categories=Office;
> > -
> > +MimeType=text/x-tex;
> > +Categories=Office;WordProcessor;
> >
> > ----------------------------------------------------------
> 
> Thanks for the patch. I'm still not too sure about how to apply this,
> though.
> Could you send the RPMLint complaints?
> I seem to remember that Debian lintian complained if there was no
> shebang in the file.
> Also, Tw does handle pdfs, so the pdf mimetype should be in there, IMO.
> And regarding the Categories, I wouldn't classify Tw as a WordProcessor
> (assuming this is interpreted as a "real" word processor, WYSIWYG-like,
> such as OpenOffice.org Writer). That's why I didn't put it in that
> category - but maybe my interpretation of the WordProcessor category is
> wrong...
> 

The RPMLint warning that goes off when I remove the patch (rather just
modify it to leave the shebang untouched) is as follows
---
texworks-svn.x86_64: W:
non-executable-script /usr/share/applications/texworks.desktop
0644 /usr/bin/env
This text file contains a shebang or is located in a path dedicated for
executables, but lacks the executable bits and cannot thus be executed.
If
the file is meant to be an executable script, add the executable bits,
otherwise remove the shebang or move the file elsewhere.
---
So I finally modified the patch to leave the MimeType as it is (patching
that was wrong), remove the shebang and to add WordProcessor to the
category, without which builds on openSUSE just fail. The same category
is used for other TeX related applications like Kile, TeXmaker and Lyx,
so I guess it would be alright here too.

Let me know what you think.

Thanks and Bye

-- 
Atri



More information about the texworks mailing list