media-libs/tremor: drop to ~hppa
[gentoo.git] / eclass / fdo-mime.eclass
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: fdo-mime.eclass
5 # @MAINTAINER:
6 # freedesktop-bugs@gentoo.org
7 # @AUTHOR:
8 # Original author: foser <foser@gentoo.org>
9 # @BLURB: Utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations
10 # @DESCRIPTION:
11 # This eclass is DEPRECATED. Please use xdg-utils or xdg instead.
12
13 # @FUNCTION: fdo-mime_desktop_database_update
14 # @DESCRIPTION:
15 # Updates the desktop database.
16 # Generates a list of mimetypes linked to applications that can handle them
17 fdo-mime_desktop_database_update() {
18         has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
19         has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
20         if [ -x "${EPREFIX}/usr/bin/update-desktop-database" ]
21         then
22                 einfo "Updating desktop mime database ..."
23                 "${EPREFIX}/usr/bin/update-desktop-database" -q "${EROOT}usr/share/applications"
24         fi
25 }
26
27 # @FUNCTION: fdo-mime_mime_database_update
28 # @DESCRIPTION:
29 # Update the mime database.
30 # Creates a general list of mime types from several sources
31 fdo-mime_mime_database_update() {
32         has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
33         has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
34         if [ -x "${EPREFIX}/usr/bin/update-mime-database" ]
35         then
36                 einfo "Updating shared mime info database ..."
37                 "${EPREFIX}/usr/bin/update-mime-database" "${EROOT}usr/share/mime"
38         fi
39 }