[Debichem-devel] [Debichem-commits] r755 - in /wnpp/bkchem/debian: bkchem.desktop bkchem.mime changelog rules

Daniel Leidert daniel.leidert.spam at gmx.net
Sun Oct 7 23:23:54 UTC 2007


Am Montag, den 08.10.2007, 06:46 +0800 schrieb LI Daobing:

> I need a tutorial on how to deal with the mimetype in debian package.

Unfortunately, there is no such tutorial. My docs about
chemical-mime-data will cover the different systems, however, these docs
are work-in-progress. You can find some information at
http://sourceforge.net/docman/index.php?group_id=159685. I've added some
more information to this mail regrading the common systems for the case,
it will help you.

> On 10/8/07, Daniel Leidert <daniel.leidert.spam at gmx.net> wrote:
> > Am Sonntag, den 07.10.2007, 22:13 +0000 schrieb LI Daobing:
[..]
> > > +application/x-cdml+xml
> > > + ext: cdml cdgz
> >
> > As I already said, I don't know this type.
> 
> How to define a new type?

If you want to define a new type for the current desktops via the Debian
package, create a XML file. You can find several examples
in /usr/share/mime/packages. After you created this file, name it
bkchem.sharedmimeinfo and call dh_installmime in debian/rules.

However, the extensions you mention seem to belong a) to a pure XML
format and b) to a gzipped XML format. So in this case, you have to
define two types. As an example, see the definitions for image/svg+xml
(*.svg, sub-class of application/xml) and image/svg+xml-compressed
(*.svgz, sub-class of application/x-gzip)
in /usr/share/mime/packages/freedesktop.org.xml. If possible, provide
the namespaceURI and localName for the XML format too). If you need some
more info, you better read the specification at fd.o or ask again (but I
will go to get some sleep in a few minutes, so I will answer tomorrow).

Making this entry will only make the new types known to the systems,
using shared-mime-info (current GNOME and ROX for example). However, KDE
3 does not support it (KDE 4 will). If you want to add support for KDE 3
too, create a .desktop file following the examples found
at /usr/share/mimelnk and put the file
under /usr/share/mimelnk/<primary_mime_type>/ (application in this
case).

The .mime and .keys files belong to the obsolete old GNOME MIME support
system. It's not necessary for us to support it.

Programs like mutt use the metamail system (/etc/mailcap). Crate a line
like the ones found in /etc/mailcap and put it into bkchem.mime. Then
call dh_installmime. However, I don't think, we need to support this.
How many bkchem (Desktop-)users would need it?

HTH and regards, Daniel




More information about the Debichem-devel mailing list