Hello,
That mimetype configuration is a quite interesting topic and there are more than a solution. I'm not an expert in the packaging of graphic applications, but these are some references [1][2][3] I found about mimetypes configuration in Debian, for example:
[..]
For the command line
Declarations of which program handles which media type is done by placing files in /usr/lib/mime/packages/. The format of the file is described in the mailcap(5) manpage, and many examples can be found in /etc/mailcap. On recent systems, dpkg triggers from the mailcap package do all the necessary operations when packages are installed or removed. Also, information from FreeDesktop menu entry files (see below) is automatically translated to mailcap entries, so it is not necessary to have both. Media type (MIME) support in Debian is formally described in the Debian policy.
[..]
For the desktop
[..]
Programs are indirectly associated to file suffixes through the association with a file type. This is done through their .desktop file, with the MimeType entry.
[..]
create a FreeDesktop entry named by the program name plus .desktop as a suffix, and document inside what file types the program can accept. Install it in ,
The topic is addressed by Debian Policy Manual, too [4].
The screen dump from gdebi-gtk in your previous message shows that the .desktop file seems to be in the control section of the package and not in the upstream/data section of the package (where it should be).
If you analyze a package from a Debian repository as an example, you will see that the .desktop file is in the data/upstream section and it is installed in the directory named /usr/share/applications .
For example, the package "audacity" [5] configures the mimetypes and its file extensions in multiple ways.
It uses the .desktop file method creating a fine named "audacity.desktop" in /usr/share/applications :
Code: Select all
$ apt download audacity
$ dpkg -c audacity_2.4.2~dfsg0-5_amd64.deb | grep -i desktop
-rw-r--r-- root/root 2322 2021-05-26 22:26 ./usr/share/applications/audacity.desktop
It uses the appstream method (if appstream is installed) creating a file named "audacity.appdata.xml" in the directory named /usr/share/metainfo :
Code: Select all
$ apt download audacity
$ dpkg -c audacity_2.4.2~dfsg0-5_amd64.deb | grep -i appdata
-rw-r--r-- root/root 3000 2020-06-19 17:16 ./usr/share/metainfo/audacity.appdata.xml
It creates a file named "audacity" in the directory named /usr/lib/mime/packages with the association between file extensions and mimetyes:
Code: Select all
$ apt download audacity
$ dpkg -c audacity_2.4.2~dfsg0-5_amd64.deb | grep -i mime
drwxr-xr-x root/root 0 2021-05-26 22:26 ./usr/lib/mime/
drwxr-xr-x root/root 0 2021-05-26 22:26 ./usr/lib/mime/packages/
-rw-r--r-- root/root 778 2021-02-27 16:24 ./usr/lib/mime/packages/audacity
Hope that helps.
EDIT: I have realized now you opened two days ago a issue report on the packaging system you are using
https://github.com/fvarrui/JavaPackager/issues/274 .
[1]
https://wiki.debian.org/MIME
[2]
https://wiki.debian.org/MimeTypesSupport
[3]
https://wiki.debian.org/MIME/etc/mime.types
[4]
https://www.debian.org/doc/debian-polic ... a-handlers
[5]
https://packages.debian.org/bullseye/audacity