summaryrefslogtreecommitdiff
path: root/eclass
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
commitec8cf101155fe39a28930d0c2396fb8868fecab7 (patch)
tree84b3063c5401d6f9bc1355b03aeeb69e855cca88 /eclass
parentStable on amd64 (Manifest recommit) (diff)
downloadgentoo-2-ec8cf101155fe39a28930d0c2396fb8868fecab7.tar.gz
gentoo-2-ec8cf101155fe39a28930d0c2396fb8868fecab7.tar.bz2
gentoo-2-ec8cf101155fe39a28930d0c2396fb8868fecab7.zip
add fdo-mime eclass & update gnome2 eclass to use it
Diffstat (limited to 'eclass')
-rw-r--r--eclass/fdo-mime.eclass38
-rw-r--r--eclass/gnome2.eclass23
2 files changed, 59 insertions, 2 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
+
+}
diff --git a/eclass/gnome2.eclass b/eclass/gnome2.eclass
index fd0d1d0dbe60..611f441eea58 100644
--- a/eclass/gnome2.eclass
+++ b/eclass/gnome2.eclass
@@ -1,12 +1,12 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.44 2004/07/23 04:52:37 obz Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.45 2004/09/14 12:10:22 foser Exp $
#
# Authors:
# Bruce A. Locke <blocke@shivan.org>
# Spidler <spider@gentoo.org>
-inherit libtool gnome.org debug
+inherit libtool gnome.org debug fdo-mime
# Gnome 2 ECLASS
ECLASS="gnome2"
@@ -22,7 +22,9 @@ use debug && G2CONF="${G2CONF} --enable-debug=yes"
DEPEND="${DEPEND} >=sys-apps/sed-4"
gnome2_src_configure() {
+
elibtoolize ${ELTCONF}
+
# doc keyword for gtk-doc
use doc \
&& G2CONF="${G2CONF} --enable-gtk-doc" \
@@ -72,10 +74,14 @@ gnome2_src_install() {
# regenerate these in pkg_postinst()
rm -rf ${D}/var/lib/scrollkeeper
+ # make sure this one doesn't get in the portage db
+ rm -fr ${D}/usr/share/applications/mimeinfo.cache
+
}
gnome2_gconf_install() {
+
if [ -x ${ROOT}/usr/bin/gconftool-2 ]
then
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
@@ -86,6 +92,7 @@ gnome2_gconf_install() {
${ROOT}/usr/bin/gconftool-2 --makefile-install-rule ${F} 1>/dev/null
done
fi
+
}
gnome2_gconf_uninstall() {
@@ -104,6 +111,7 @@ gnome2_gconf_uninstall() {
}
gnome2_omf_fix() {
+
# workaround/patch against omf.make or omf-install/Makefile.in
# in order to remove redundant scrollkeeper-updates.
# - <liquidx@gentoo.org>
@@ -127,19 +135,26 @@ gnome2_omf_fix() {
einfo "Fixing OMF Makefile: ${omf#${S}/}"
sed -i -e 's:-scrollkeeper-update.*::' ${omf}
done
+
}
gnome2_scrollkeeper_update() {
+
if [ -x ${ROOT}/usr/bin/scrollkeeper-update ] && [ "${SCROLLKEEPER_UPDATE}" = "1" ]
then
echo ">>> Updating Scrollkeeper"
scrollkeeper-update -q -p ${ROOT}/var/lib/scrollkeeper
fi
+
}
gnome2_pkg_postinst() {
+
gnome2_gconf_install
gnome2_scrollkeeper_update
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+
}
#gnome2_pkg_prerm() {
@@ -149,7 +164,11 @@ gnome2_pkg_postinst() {
#}
gnome2_pkg_postrm() {
+
gnome2_scrollkeeper_update
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+
}