summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2004-09-14 12:10:22 +0000
committerMarinus Schraal <foser@gentoo.org>2004-09-14 12:10:22 +0000
commit82a58dc4aae7688940621dba10e311cc6bf1d2e9 (patch)
treee0d6829f308fd11603ec488568402eda747a1587 /eclass/fdo-mime.eclass
parentStable on amd64 (diff)
downloadhistorical-82a58dc4aae7688940621dba10e311cc6bf1d2e9.tar.gz
historical-82a58dc4aae7688940621dba10e311cc6bf1d2e9.tar.bz2
historical-82a58dc4aae7688940621dba10e311cc6bf1d2e9.zip
add fdo-mime eclass & update gnome2 eclass to use it
Diffstat (limited to 'eclass/fdo-mime.eclass')
-rw-r--r--eclass/fdo-mime.eclass38
1 files changed, 38 insertions, 0 deletions
diff --git a/eclass/fdo-mime.eclass b/eclass/fdo-mime.eclass
new file mode 100644
index 000000000000..2f60c67de511
--- /dev/null
+++ b/eclass/fdo-mime.eclass
@@ -0,0 +1,38 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.1 2004/09/14 12:10:22 foser Exp $
+
+# Author:
+# foser <foser@gentoo.org>
+
+# utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations
+# <references here>
+
+ECLASS="fdo-mime"
+INHERITED="$INHERITED $ECLASS"
+
+# Updates the desktop database
+# Generates a list of mimetypes linked to applications that can handle them
+
+fdo-mime_desktop_database_update() {
+
+ if [ -x ${ROOT}/usr/bin/update-desktop-database ]
+ then
+ einfo "Updating desktop mime database..."
+ update-desktop-database -q /usr/share/applications
+ fi
+
+}
+
+# Update the mime database
+# Creates a general list of mime types from several sources
+
+fdo-mime_mime_database_update() {
+
+ if [ -x ${ROOT}/usr/bin/update-mime-database ]
+ then
+ einfo "Updating shared mime info database..."
+ update-mime-database /usr/share/mime
+ fi
+
+}