diff --git a/en/gnome/docs/porting.sgml b/en/gnome/docs/porting.sgml index a7283e4f35..c4d254d8d4 100644 --- a/en/gnome/docs/porting.sgml +++ b/en/gnome/docs/porting.sgml @@ -1,6 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" [ <!ENTITY base CDATA "../.."> -<!ENTITY date "$FreeBSD: www/en/gnome/docs/porting.sgml,v 1.44 2004/09/18 04:25:52 mezz Exp $"> +<!ENTITY date "$FreeBSD: www/en/gnome/docs/porting.sgml,v 1.45 2004/11/16 07:35:53 mezz Exp $"> <!ENTITY title "FreeBSD GNOME Project: How To Make a Port"> <!ENTITY % gnomeincludes SYSTEM "../includes.sgml"> %gnomeincludes; <!ENTITY % includes SYSTEM "../../includes.sgml"> %includes; @@ -260,6 +260,53 @@ GCONF_SCHEMAS= CDDB-Slave2.schemas gnome-audio-profiles.schemas \ either schema files or installtion of GConf.</p> <!-- End GConf schemas --> +<!-- Begin Shared MIME database --> + <h2>Shared MIME database</h2> + + <p>If your port install files like <tt>application/x-portname.xml</tt> + in <tt>share/mime</tt>, you have to add these two lines at the + end of the <tt>pkg-plist</tt>:</p> + + <pre> +@exec update-mime-database %D/share/mime +@unexec update-mime-database %D/share/mime + </pre> + + <p>Also make sure <tt>shared-mime-info</tt> is among the dependencies + of your port. If your port use <tt>gtk20</tt>, you will have + <tt>shared-mime-info</tt> indirectly. You can check indirect + dependencies with <tt>make describe</tt>.</p> + + <p>Example port to look at: <a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/deskutils/drivel/"><tt>deskutils/drivel</tt></a></p> +<!-- End Shared MIME database --> + +<!-- Begin Desktop database --> + <h2>Desktop database</h2> + + <p>Some ports provide MIME definitions in their <tt>.desktop</tt> + files. If your port install <tt>.desktop</tt> file into + <tt>share/gnome/applications</tt> and there is a line starting + with <tt>MimeType</tt> in it, you need to update desktop + database after install and deinstall. This database is represented + by <tt>share/gnome/applications/mimeinfo.cache</tt> file. Add + dependency on GNOME component <tt>desktopfileutils</tt> and + these lines to the end of <tt>pkg-plist</tt>:</p> + + <pre> +@exec update-desktop-database > /dev/null || /usr/bin/true +@unexec update-desktop-database > /dev/null || /usr/bin/true + </pre> + + <p>Also add following to the <tt>post-install</tt> target in port's + Makefile:</p> + + <pre> +-@update-desktop-database + </pre> + + <p>Example port to look at: <a href="http://www.freebsd.org/cgi/cvsweb.cgi/ports/editors/leafpad/"><tt>editors/leafpad</tt></a></p> +<!-- End Desktop database --> + <!-- Begin GNOME libtool --> <a name="libtool"></a> <h2>Libtool Issues</h2>