Mailinglist Archive: opensuse-buildservice (206 mails)

< Previous Next >
Re: [opensuse-buildservice] How to associate an extention with an executable via package?
  • From: Susanne Oberhauser <froh@xxxxxxxxxx>
  • Date: Mon, 23 Mar 2009 09:31:03 +0100
  • Message-id: <s2ir60oej3s.fsf@xxxxxxxxxxxxx>
Richard Bos <rbos@xxxxxxxxxxxx> writes:

Hi,

I have a package that provides an executable (/usr/bin/ib) for data files
with
the extension .ibv. How can I associate the executable /usr/bin/ib with the
extension (.ibv) via package? Should I install a mimetype file in the
directory /usr/share/mime? If yes, what should the file contain? If I look
at e.g. /usr/share/mime/application/x-zoo.xml it does not really seem to
link
an extension with an executable.

have a look at
/usr/share/mime/packages/
and
http://www.freedesktop.org/wiki/Standards/shared-mime-info-spec
/usr/share/doc/packages/shared-mime-info/README

linux/unix file types are determined by file content matching (called
'magic') or alternatively file extension matching (called 'glob'). The
content match is preferrable as it's more robust to user errors.

After you've set up the file below /usr/share/mime/packages/, you run
/usr/bin/update-mime-database, from %post...

hth?


S.

--
Susanne Oberhauser +49-911-74053-574 SUSE -- a Novell Business
OPS Engineering Maxfeldstraße 5
Processes and Infrastructure Nürnberg
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
References