/[gentoo-x86]/eclass/fdo-mime.eclass
Gentoo

Diff of /eclass/fdo-mime.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.13
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.3 2005/07/06 20:20:03 agriffis Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.13 2011/08/09 19:01:29 darkside Exp $
4 4
5# Author: 5# @ECLASS: fdo-mime.eclass
6# @MAINTAINER: freedesktop-bugs@gentoo.org
7#
8#
6# foser <foser@gentoo.org> 9# Original author: foser <foser@gentoo.org>
10# @BLURB: Utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations
7 11
8# utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations
9# <references here>
10 12
11INHERITED="$INHERITED $ECLASS" 13# @FUNCTION: fdo-mime_desktop_database_update
12 14# @DESCRIPTION:
13# Updates the desktop database 15# Updates the desktop database.
14# Generates a list of mimetypes linked to applications that can handle them 16# Generates a list of mimetypes linked to applications that can handle them
15
16fdo-mime_desktop_database_update() { 17fdo-mime_desktop_database_update() {
17 18 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
19 has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
18 if [ -x ${ROOT}/usr/bin/update-desktop-database ] 20 if [ -x "${EPREFIX}/usr/bin/update-desktop-database" ]
19 then 21 then
20 einfo "Updating desktop mime database ..." 22 einfo "Updating desktop mime database ..."
21 update-desktop-database -q /usr/share/applications 23 "${EPREFIX}/usr/bin/update-desktop-database" -q "${EROOT}usr/share/applications"
22 fi 24 fi
23
24} 25}
25 26
27# @FUNCTION: fdo-mime_mime_database_update
28# @DESCRIPTION:
26# Update the mime database 29# Update the mime database.
27# Creates a general list of mime types from several sources 30# Creates a general list of mime types from several sources
28
29fdo-mime_mime_database_update() { 31fdo-mime_mime_database_update() {
30 32 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
33 has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
31 if [ -x ${ROOT}/usr/bin/update-mime-database ] 34 if [ -x "${EPREFIX}/usr/bin/update-mime-database" ]
32 then 35 then
33 einfo "Updating shared mime info database ..." 36 einfo "Updating shared mime info database ..."
34 update-mime-database /usr/share/mime 37 "${EPREFIX}/usr/bin/update-mime-database" "${EROOT}usr/share/mime"
35 fi 38 fi
36
37} 39}

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20