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

Diff of /eclass/gdesklets.eclass

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

Revision 1.1 Revision 1.4
1# Copyright 2004 Gentoo Foundation 1# Copyright 2004 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.1 2005/04/19 03:16:52 obz Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gdesklets.eclass,v 1.4 2005/06/06 02:00:12 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:
73 # This creates the subdirectory of ${DESKLET_NAME} 73 # This creates the subdirectory of ${DESKLET_NAME}
74 # in the global Displays directory 74 # in the global Displays directory
75 [[ -d ${GD_INSDIR} ]] || \ 75 [[ -d ${GD_INSDIR} ]] || \
76 dodir ${GD_INSDIR} 76 dodir ${GD_INSDIR}
77 77
78 insinto ${GD_INSDIR}
79
80 # For each of the Display files, there may be 78 # For each of the Display files, there may be
81 # scripts included inline which don't necessarily 79 # scripts included inline which don't necessarily
82 # follow any naming scheme. 80 # follow any naming scheme.
83 # So for each of them, determine what those scripts are 81 # So for each of them, determine what those scripts are
84 # and install them. 82 # and install them.
111 # directory, this will be done more than 109 # directory, this will be done more than
112 # once. It's the only solution I can 110 # once. It's the only solution I can
113 # come up with for now... 111 # come up with for now...
114 GFX=(`find . \ 112 GFX=(`find . \
115 -iname "*.png" -o -iname "*.svg" \ 113 -iname "*.png" -o -iname "*.svg" \
116 -o -iname "*.jpg" -o -iname "*.gif"`) 114 -o -iname "*.jpg" -o -iname "*.gif" \
115 -o -iname "*.xcf"`)
117 116
118 for G in ${GFX[@]}; do 117 for G in ${GFX[@]}; do
118
119 insinto ${GD_INSDIR}/`dirname ${G}` 119 insinto ${GD_INSDIR}/`dirname ${G}`
120 doins ${G} 120 doins ${G}
121 done 121
122 done # for in ${GFX}
122 123
123 cd ${S} 124 cd ${S}
124 125
125 done # for in ${DISPLAY_FILES} 126 done # for in ${DISPLAY_FILES}
126 127
139 # There are possibly multiple Controls packaged with the display. 140 # There are possibly multiple Controls packaged with the display.
140 # For each __init__.py found, there must be a Control associated with it. 141 # For each __init__.py found, there must be a Control associated with it.
141 for CTRL in ${CONTROL_INITS[@]}; do 142 for CTRL in ${CONTROL_INITS[@]}; do
142 143
143 cd `dirname ${CTRL}` 144 cd `dirname ${CTRL}`
144 CTRL_NAME=$( ${GDESKLETS_INST_DIR}/gdesklets-control-getid `pwd` ) 145 CTRL_NAME=$( PYTHON_DONTCOMPILE=1 ${GDESKLETS_INST_DIR}/gdesklets-control-getid `pwd` )
145 einfo "Installing Control ${CTRL_NAME}" 146 einfo "Installing Control ${CTRL_NAME}"
146 # This creates the subdirectory of ${CTRL_NAME} 147 # This creates the subdirectory of ${CTRL_NAME}
147 # in the global Controls directory 148 # in the global Controls directory
148 [[ -d ${GD_INSDIR}/${CTRL_NAME} ]] || \ 149 [[ -d ${GD_INSDIR}/${CTRL_NAME} ]] || \
149 dodir ${GD_INSDIR}/${CTRL_NAME} 150 dodir ${GD_INSDIR}/${CTRL_NAME}
150 151
151 insinto ${GD_INSDIR}/${CTRL_NAME} 152 insinto ${GD_INSDIR}/${CTRL_NAME}
152 153
161 # Install any remaining graphics and other files 162 # Install any remaining graphics and other files
162 # that are sitting in ${S}. 163 # that are sitting in ${S}.
163 164
164 GFX=$(find . -maxdepth 1 \ 165 GFX=$(find . -maxdepth 1 \
165 -iname "*.png" -o -iname "*.svg" \ 166 -iname "*.png" -o -iname "*.svg" \
166 -o -iname "*.jpg" -o -iname "*.gif") 167 -o -iname "*.jpg" -o -iname "*.gif" \
168 -o -iname "*.xcf")
167 169
168 if [[ -n "${GFX}" ]]; then 170 if [[ -n "${GFX}" ]]; then
169 # Install to the Displays directory of the Desklet 171 # Install to the Displays directory of the Desklet
170 insinto ${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME} 172 insinto ${GDESKLETS_INST_DIR}/Displays/${DESKLET_NAME}
171 doins ${GFX} 173 doins ${GFX}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20