A question about custom MIME types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




    Dear all, 
I am working on my 'Atomes' package (non official yet) and I kindly ask for your advise.

I have a question regarding my spec file:

https://github.com/Slookeur/Atomes-GNU/blob/main/atomes.spec

I recently figured out how to handle file associations and creating my custom MIME type.

To do that I created an 'atomes-mime.xml' file:

https://github.com/Slookeur/Atomes-GNU/blob/main/metadata/atomes-mime.xml

that I installed in the '/usr/share/mime/packages/' directory,
and after that I updated the MIME database using:

update-mime-database /usr/share/mime

It works just as expected, but this should be obvious to many I guess.

However the first time I tried to build the RPM it failed, because this last command creates
and/or modify a bunch of files in the '/usr/share/mime' and '/usr/share/applications' folders:

   /usr/share/applications/mimeinfo.cache
   /usr/share/mime/XMLnamespaces
   /usr/share/mime/aliases
   /usr/share/mime/application/x-apf.xml
   /usr/share/mime/application/x-awf.xml
   /usr/share/mime/generic-icons
   /usr/share/mime/globs
   /usr/share/mime/globs2
   /usr/share/mime/icons
   /usr/share/mime/magic
   /usr/share/mime/mime.cache
   /usr/share/mime/packages/atomes-mime.xml
   /usr/share/mime/subclasses
   /usr/share/mime/treemagic
   /usr/share/mime/types
   /usr/share/mime/version

So I add to correct the spec file to include these files, I did it like this:

%{_datadir}/mime
%{_datadir}/applications

So that all files that my build creates in these folders will be added properly to the RPM.

Now comes my question: some of these files seem to be configuration files, that the 'update-mime-database'
simply updates, so I am not confident in saying that these should be installed by my RPM,
it might just be better to have these files simply updated after the installation, but I do not know how.

I tried to remove the 'update-mime-database' from the 'Makefile.am' (the project uses GNU autotools)
and put it in the '%check' section of the spec file but it does not work (same issue).

So far the RPM builds everywhere (local, Copr, Koji) but I am not sure that it is correct, what do you think ?

Thanks in advance for your advise.

Best regards.

Sébastien
-- 
===========================================================
Dr. Sébastien Le Roux
Ingénieur de Recherche CNRS
Institut de Physique et Chimie des Matériaux de Strasbourg
Département des Matériaux Organiques
23, rue du Loess
BP 43
F-67034 Strasbourg Cedex 2, France
E-mail: sebastien.leroux@xxxxxxxxxxxxxxxx
Webpage: https://www.ipcms.fr/sebastien-le-roux/
ATOMES project: https://atomes.ipcms.fr/
RINGS project: http://rings-code.sourceforge.net/
ISAACS project: http://isaacs.sourceforge.net/
Fax:   +33 3 88 10 72 46
Phone: +33 3 88 10 71 58
===========================================================
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux