/[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.1.1.1 Revision 1.14
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2011 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.1.1.1 2005/11/30 09:59:19 chriswhite Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.14 2011/08/22 04:46:31 vapier Exp $
4 4
5# Author: 5# @ECLASS: fdo-mime.eclass
6# @MAINTAINER:
7# freedesktop-bugs@gentoo.org
8# @AUTHOR:
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 12# @FUNCTION: fdo-mime_desktop_database_update
9# <references here> 13# @DESCRIPTION:
10
11
12# Updates the desktop database 14# Updates the desktop database.
13# Generates a list of mimetypes linked to applications that can handle them 15# Generates a list of mimetypes linked to applications that can handle them
14
15fdo-mime_desktop_database_update() { 16fdo-mime_desktop_database_update() {
16 17 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
18 has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
17 if [ -x ${ROOT}/usr/bin/update-desktop-database ] 19 if [ -x "${EPREFIX}/usr/bin/update-desktop-database" ]
18 then 20 then
19 einfo "Updating desktop mime database ..." 21 einfo "Updating desktop mime database ..."
20 update-desktop-database -q /usr/share/applications 22 "${EPREFIX}/usr/bin/update-desktop-database" -q "${EROOT}usr/share/applications"
21 fi 23 fi
22
23} 24}
24 25
26# @FUNCTION: fdo-mime_mime_database_update
27# @DESCRIPTION:
25# Update the mime database 28# Update the mime database.
26# Creates a general list of mime types from several sources 29# Creates a general list of mime types from several sources
27
28fdo-mime_mime_database_update() { 30fdo-mime_mime_database_update() {
29 31 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
32 has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
30 if [ -x ${ROOT}/usr/bin/update-mime-database ] 33 if [ -x "${EPREFIX}/usr/bin/update-mime-database" ]
31 then 34 then
32 einfo "Updating shared mime info database ..." 35 einfo "Updating shared mime info database ..."
33 update-mime-database /usr/share/mime 36 "${EPREFIX}/usr/bin/update-mime-database" "${EROOT}usr/share/mime"
34 fi 37 fi
35
36} 38}

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20