I don't like unofficial repos, so I did it manually, in my case with truecrypt. I think you can use
The 1st step is: Is there any related MIME type exists? I tried to find the .tc extension or the truecrypt text:
grep -i -e "\.tc" /usr/share/mime/packages/*
grep -i -e "truec" /usr/share/mime/packages/*
I didn't find anything, so I created it into /usr/share/mime/packages/truecrypt.xml
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-truecrypt">
<comment>TrueCrypt encrypted file container</comment>
<icon name="truecrypt"/>
<glob-deleteall/>
<glob pattern="*.tc"/>
</mime-type>
</mime-info>
I found 3 matches for the .fig extension (under the image/x-fig MIME type by freedesktop, and under application/x-cabri in kde.xml) so I think you don't need to create this, but someone may find it useful.
In my case the truecrypt.desktop file did not contain any MIME type info, so I added this mime type to the end of the file: /usr/share/applications/truecrypt.desktop
MimeType=application/x-truecrypt
My new MIME type was not associated with any program, so I added this line to the end of the default file, which is in /usr/share/applications/defaults.list
application/x-truecrypt=truecrpyt.desktop
If your MIME type existed, I think you need to change this association instead of creating one more.
At last update the databases:
sudo update-mime-database /usr/share/mime
sudo update-desktop-database