/[gentoo-x86]/eclass/gdesklets.eclass
Gentoo

Diff of /eclass/gdesklets.eclass

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

Revision 1.14 Revision 1.15
1# Copyright 2004-2006 Gentoo Foundation 1# Copyright 2004-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License, v2 or later 2# Distributed under the terms of the GNU General Public License, v2 or later
3# $Header: /var/cvsroot/gentoo-x86/eclass/gdesklets.eclass,v 1.14 2006/05/26 04:18:43 nixphoeni Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gdesklets.eclass,v 1.15 2007/10/16 22:46:31 nixphoeni Exp $
4# 4#
5# Authors: Joe Sapp <nixphoeni@gentoo.org> 5# Authors: Joe Sapp <nixphoeni@gentoo.org>
6# Mike Gardiner <obz@gentoo.org> 6# Mike Gardiner <obz@gentoo.org>
7# 7#
8# Usage: 8# Usage:
27# Ebuild writer shouldn't need to touch these (except maybe $RDEPEND) 27# Ebuild writer shouldn't need to touch these (except maybe $RDEPEND)
28SLOT="0" 28SLOT="0"
29IUSE="" 29IUSE=""
30RDEPEND=">=gnome-extra/gdesklets-core-0.34.3-r1" 30RDEPEND=">=gnome-extra/gdesklets-core-0.34.3-r1"
31 31
32GDESKLETS_INST_DIR="/usr/$(get_libdir)/gdesklets" 32GDESKLETS_INST_DIR="${ROOT}usr/$(get_libdir)/gdesklets"
33 33
34gdesklets_src_install() { 34gdesklets_src_install() {
35 35
36 debug-print-function $FUNCNAME $* 36 debug-print-function $FUNCNAME $*
37 37
45 GDESKLETS_INST_DIR="/usr/share/gdesklets" 45 GDESKLETS_INST_DIR="/usr/share/gdesklets"
46 46
47 # This should be done by the gdesklets-core ebuild 47 # This should be done by the gdesklets-core ebuild
48 # It makes the Displays or Controls directory in the 48 # It makes the Displays or Controls directory in the
49 # global installation directory if it doesn't exist 49 # global installation directory if it doesn't exist
50 [[ -d ${GDESKLETS_INST_DIR}/Displays ]] || \ 50 [[ -d "${GDESKLETS_INST_DIR}/Displays" ]] || \
51 dodir ${GDESKLETS_INST_DIR}/Displays 51 dodir "${GDESKLETS_INST_DIR}/Displays"
52 52
53 # The displays only need to be readable 53 # The displays only need to be readable
54 insopts -m0744 54 insopts -m0744
55 55
56 # Check to see if DISPLAY is set for the 56 # Check to see if DISPLAY is set for the
83 # Base installation directory for displays from this desklet 83 # Base installation directory for displays from this desklet
84 DESKLET_INSDIR="${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME}" 84 DESKLET_INSDIR="${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME}"
85 85
86 # This creates the subdirectory of ${DESKLET_NAME} 86 # This creates the subdirectory of ${DESKLET_NAME}
87 # in the global Displays directory 87 # in the global Displays directory
88 [[ -d ${DESKLET_INSDIR} ]] || \ 88 [[ -d "${DESKLET_INSDIR}" ]] || \
89 dodir ${DESKLET_INSDIR} 89 dodir "${DESKLET_INSDIR}"
90 90
91 # For each of the Display files, there may be 91 # For each of the Display files, there may be
92 # scripts included inline which don't necessarily 92 # scripts included inline which don't necessarily
93 # follow any naming scheme. 93 # follow any naming scheme.
94 # So for each of them, determine what those scripts are 94 # So for each of them, determine what those scripts are
97 97
98 cd `dirname ${DSP}` 98 cd `dirname ${DSP}`
99 einfo "Installing Display `basename ${DSP} .display`" 99 einfo "Installing Display `basename ${DSP} .display`"
100 debug-print "Installing ${DSP} into ${DESKLET_INSDIR}" 100 debug-print "Installing ${DSP} into ${DESKLET_INSDIR}"
101 DSP=`basename ${DSP}` 101 DSP=`basename ${DSP}`
102 insinto ${DESKLET_INSDIR} 102 insinto "${DESKLET_INSDIR}"
103 doins ${DSP} 103 doins ${DSP}
104 104
105 SCRIPTS=$(grep "script .*uri" ${DSP} | \ 105 SCRIPTS=$(grep "script .*uri" ${DSP} | \
106 sed -e 's:.*<script .*uri=": :g' -e 's:"/>.*: :g') 106 sed -e 's:.*<script .*uri=": :g' -e 's:"/>.*: :g')
107 107
109 # base directory and change the install location 109 # base directory and change the install location
110 # so it gets installed at the proper place 110 # so it gets installed at the proper place
111 # relative to the display. 111 # relative to the display.
112 for SCR in ${SCRIPTS[@]}; do 112 for SCR in ${SCRIPTS[@]}; do
113 113
114 insinto ${DESKLET_INSDIR}/`dirname ${SCR}` 114 insinto "${DESKLET_INSDIR}/`dirname ${SCR}`"
115 doins ${SCR} 115 doins "${SCR}"
116 debug-print "Installed ${SCR} into ${DESKLET_INSDIR}/`dirname ${SCR}`" 116 debug-print "Installed ${SCR} into ${DESKLET_INSDIR}/`dirname ${SCR}`"
117 117
118 done # for in ${SCRIPTS} 118 done # for in ${SCRIPTS}
119 119
120 # Install the graphics for this display. 120 # Install the graphics for this display.
127 -o -iname "*.jpg" -o -iname "*.gif" \ 127 -o -iname "*.jpg" -o -iname "*.gif" \
128 -o -iname "*.xcf"`) 128 -o -iname "*.xcf"`)
129 129
130 for G in ${GFX[@]}; do 130 for G in ${GFX[@]}; do
131 131
132 insinto ${DESKLET_INSDIR}/`dirname ${G}` 132 insinto "${DESKLET_INSDIR}/`dirname ${G}`"
133 doins ${G} 133 doins "${G}"
134 debug-print "Installed ${G} into ${DESKLET_INSDIR}/`dirname ${G}`" 134 debug-print "Installed ${G} into ${DESKLET_INSDIR}/`dirname ${G}`"
135 135
136 done # for in ${GFX} 136 done # for in ${GFX}
137 137
138 cd ${S} 138 cd "${S}"
139 139
140 done # for in ${DISPLAY_FILES} 140 done # for in ${DISPLAY_FILES}
141 141
142 fi 142 fi
143 143
162 cd `dirname ${CTRL}` 162 cd `dirname ${CTRL}`
163 CTRL_NAME=$( ${GDESKLETS_INST_DIR}/gdesklets-control-getid `pwd` ) 163 CTRL_NAME=$( ${GDESKLETS_INST_DIR}/gdesklets-control-getid `pwd` )
164 einfo "Installing Control ${CTRL_NAME}" 164 einfo "Installing Control ${CTRL_NAME}"
165 # This creates the subdirectory of ${CTRL_NAME} 165 # This creates the subdirectory of ${CTRL_NAME}
166 # in the global Controls directory 166 # in the global Controls directory
167 [[ -d ${CONTROL_INSDIR}/${CTRL_NAME} ]] || \ 167 [[ -d "${CONTROL_INSDIR}/${CTRL_NAME}" ]] || \
168 dodir ${CONTROL_INSDIR}/${CTRL_NAME} 168 dodir "${CONTROL_INSDIR}/${CTRL_NAME}"
169 169
170 insinto ${CONTROL_INSDIR}/${CTRL_NAME} 170 insinto "${CONTROL_INSDIR}/${CTRL_NAME}"
171 171
172 doins -r * 172 doins -r *
173 173
174 cd ${S} 174 cd "${S}"
175 175
176 done # for in ${CONTROL_INITS} 176 done # for in ${CONTROL_INITS}
177 177
178 fi # if no Sensors 178 fi # if no Sensors
179 179
186 -o -iname "*.xcf") 186 -o -iname "*.xcf")
187 187
188 if [[ -n "${GFX}" ]]; then 188 if [[ -n "${GFX}" ]]; then
189 189
190 # Install to the Displays directory of the Desklet 190 # Install to the Displays directory of the Desklet
191 insinto ${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME} 191 insinto "${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME}"
192 doins ${GFX} 192 doins "${GFX}"
193 debug-print "Installed ${GFX} into ${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME}" 193 debug-print "Installed ${GFX} into ${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME}"
194 194
195 fi # if -n "${GFX}" 195 fi # if -n "${GFX}"
196 196
197 # Install some docs if so requested 197 # Install some docs if so requested
198 [[ -n "${DOCS}" ]] && dodoc ${DOCS} && \ 198 [[ -n "${DOCS}" ]] && dodoc "${DOCS}" && \
199 debug-print "Installed ${DOCS}" 199 debug-print "Installed ${DOCS}"
200 200
201} 201}
202 202
203 203

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

  ViewVC Help
Powered by ViewVC 1.1.20