/[gentoo-x86]/eclass/gnome2-utils.eclass
Gentoo

Diff of /eclass/gnome2-utils.eclass

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

Revision 1.15 Revision 1.16
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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/gnome2-utils.eclass,v 1.15 2010/12/07 06:21:59 eva Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.16 2010/12/07 06:23:34 eva Exp $
4 4
5# 5#
6# gnome2-utils.eclass 6# gnome2-utils.eclass
7# 7#
8# Set of auxiliary functions used to perform actions commonly needed by packages 8# Set of auxiliary functions used to perform actions commonly needed by packages
12# 12#
13 13
14 14
15 15
16# Path to gconftool-2 16# Path to gconftool-2
17: ${GCONFTOOL_BIN:="${ROOT}usr/bin/gconftool-2"} 17: ${GCONFTOOL_BIN:="/usr/bin/gconftool-2"}
18 18
19# Directory where scrollkeeper-update should do its work 19# Directory where scrollkeeper-update should do its work
20: ${SCROLLKEEPER_DIR:="${ROOT}var/lib/scrollkeeper"} 20: ${SCROLLKEEPER_DIR:="/var/lib/scrollkeeper"}
21 21
22# Path to scrollkeeper-update 22# Path to scrollkeeper-update
23: ${SCROLLKEEPER_UPDATE_BIN:="${ROOT}usr/bin/scrollkeeper-update"} 23: ${SCROLLKEEPER_UPDATE_BIN:="/usr/bin/scrollkeeper-update"}
24 24
25# Path to gtk-update-icon-cache 25# Path to gtk-update-icon-cache
26: ${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"} 26: ${GTK_UPDATE_ICON_CACHE:="/usr/bin/gtk-update-icon-cache"}
27 27
28# Path to glib-compile-schemas 28# Path to glib-compile-schemas
44 44
45 45
46# Applies any schema files installed by the current ebuild to Gconf's database 46# Applies any schema files installed by the current ebuild to Gconf's database
47# using gconftool-2 47# using gconftool-2
48gnome2_gconf_install() { 48gnome2_gconf_install() {
49 local updater="${ROOT}${GCONFTOOL_BIN}"
49 local F 50 local F
50 51
51 if [[ ! -x "${GCONFTOOL_BIN}" ]]; then 52 if [[ ! -x "${updater}" ]]; then
52 return 53 return
53 fi 54 fi
54 55
55 if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then 56 if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
56 einfo "No GNOME 2 GConf schemas found" 57 einfo "No GNOME 2 GConf schemas found"
57 return 58 return
58 fi 59 fi
59 60
60 # We are ready to install the GCONF Scheme now 61 # We are ready to install the GCONF Scheme now
61 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL 62 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
62 export GCONF_CONFIG_SOURCE="$("${GCONFTOOL_BIN}" --get-default-source | sed "s;:/;:${ROOT};")" 63 export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
63 64
64 einfo "Installing GNOME 2 GConf schemas" 65 einfo "Installing GNOME 2 GConf schemas"
65 66
66 for F in ${GNOME2_ECLASS_SCHEMAS}; do 67 for F in ${GNOME2_ECLASS_SCHEMAS}; do
67 if [[ -e "${ROOT}${F}" ]]; then 68 if [[ -e "${ROOT}${F}" ]]; then
68 # echo "DEBUG::gconf install ${F}" 69 # echo "DEBUG::gconf install ${F}"
69 "${GCONFTOOL_BIN}" --makefile-install-rule "${ROOT}${F}" 1>/dev/null 70 "${updater}" --makefile-install-rule "${ROOT}${F}" 1>/dev/null
70 fi 71 fi
71 done 72 done
72 73
73 # have gconf reload the new schemas 74 # have gconf reload the new schemas
74 pids=$(pgrep -x gconfd-2) 75 pids=$(pgrep -x gconfd-2)
81 82
82 83
83# Removes schema files previously installed by the current ebuild from Gconf's 84# Removes schema files previously installed by the current ebuild from Gconf's
84# database. 85# database.
85gnome2_gconf_uninstall() { 86gnome2_gconf_uninstall() {
87 local updater="${ROOT}${GCONFTOOL_BIN}"
86 local F 88 local F
87 89
88 if [[ ! -x "${GCONFTOOL_BIN}" ]]; then 90 if [[ ! -x "${updater}" ]]; then
89 return 91 return
90 fi 92 fi
91 93
92 if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then 94 if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then
93 einfo "No GNOME 2 GConf schemas found" 95 einfo "No GNOME 2 GConf schemas found"
94 return 96 return
95 fi 97 fi
96 98
97 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL 99 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
98 export GCONF_CONFIG_SOURCE="$("${GCONFTOOL_BIN}" --get-default-source | sed "s;:/;:${ROOT};")" 100 export GCONF_CONFIG_SOURCE="$("${updater}" --get-default-source | sed "s;:/;:${ROOT};")"
99 101
100 einfo "Uninstalling GNOME 2 GConf schemas" 102 einfo "Uninstalling GNOME 2 GConf schemas"
101 103
102 for F in ${GNOME2_ECLASS_SCHEMAS}; do 104 for F in ${GNOME2_ECLASS_SCHEMAS}; do
103 if [[ -e "${ROOT}${F}" ]]; then 105 if [[ -e "${ROOT}${F}" ]]; then
104 # echo "DEBUG::gconf uninstall ${F}" 106 # echo "DEBUG::gconf uninstall ${F}"
105 "${GCONFTOOL_BIN}" --makefile-uninstall-rule "${ROOT}${F}" 1>/dev/null 107 "${updater}" --makefile-uninstall-rule "${ROOT}${F}" 1>/dev/null
106 fi 108 fi
107 done 109 done
108 110
109 # have gconf reload the new schemas 111 # have gconf reload the new schemas
110 pids=$(pgrep -x gconfd-2) 112 pids=$(pgrep -x gconfd-2)
220} 222}
221 223
222 224
223# Updates the global scrollkeeper database. 225# Updates the global scrollkeeper database.
224gnome2_scrollkeeper_update() { 226gnome2_scrollkeeper_update() {
225 if [[ -x "${SCROLLKEEPER_UPDATE_BIN}" ]]; then 227 if [[ -x "${ROOT}${SCROLLKEEPER_UPDATE_BIN}" ]]; then
226 einfo "Updating scrollkeeper database ..." 228 einfo "Updating scrollkeeper database ..."
227 "${SCROLLKEEPER_UPDATE_BIN}" -q -p "${SCROLLKEEPER_DIR}" 229 "${ROOT}${SCROLLKEEPER_UPDATE_BIN}" -q -p "${ROOT}${SCROLLKEEPER_DIR}"
228 fi 230 fi
229} 231}
230 232
231gnome2_schemas_savelist() { 233gnome2_schemas_savelist() {
232 pushd "${D}" &>/dev/null 234 pushd "${D}" &>/dev/null

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20