| 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.3 2005/06/06 01:45:33 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. |
| … | |
… | |
| 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"`) |
| 117 | |
115 | |
| 118 | for G in ${GFX[@]}; do |
116 | for G in ${GFX[@]}; do |
|
|
117 | |
| 119 | insinto ${GD_INSDIR}/`dirname ${G}` |
118 | insinto ${GD_INSDIR}/`dirname ${G}` |
| 120 | doins ${G} |
119 | doins ${G} |
| 121 | done |
120 | |
|
|
121 | done # for in ${GFX} |
| 122 | |
122 | |
| 123 | cd ${S} |
123 | cd ${S} |
| 124 | |
124 | |
| 125 | done # for in ${DISPLAY_FILES} |
125 | done # for in ${DISPLAY_FILES} |
| 126 | |
126 | |
| … | |
… | |
| 139 | # There are possibly multiple Controls packaged with the display. |
139 | # There are possibly multiple Controls packaged with the display. |
| 140 | # For each __init__.py found, there must be a Control associated with it. |
140 | # For each __init__.py found, there must be a Control associated with it. |
| 141 | for CTRL in ${CONTROL_INITS[@]}; do |
141 | for CTRL in ${CONTROL_INITS[@]}; do |
| 142 | |
142 | |
| 143 | cd `dirname ${CTRL}` |
143 | cd `dirname ${CTRL}` |
| 144 | CTRL_NAME=$( ${GDESKLETS_INST_DIR}/gdesklets-control-getid `pwd` ) |
144 | CTRL_NAME=$( PYTHON_DONTCOMPILE=1 ${GDESKLETS_INST_DIR}/gdesklets-control-getid `pwd` ) |
| 145 | einfo "Installing Control ${CTRL_NAME}" |
145 | einfo "Installing Control ${CTRL_NAME}" |
| 146 | # This creates the subdirectory of ${CTRL_NAME} |
146 | # This creates the subdirectory of ${CTRL_NAME} |
| 147 | # in the global Controls directory |
147 | # in the global Controls directory |
| 148 | [[ -d ${GD_INSDIR}/${CTRL_NAME} ]] || \ |
148 | [[ -d ${GD_INSDIR}/${CTRL_NAME} ]] || \ |
| 149 | dodir ${GD_INSDIR}/${CTRL_NAME} |
149 | dodir ${GD_INSDIR}/${CTRL_NAME} |
| 150 | |
150 | |
| 151 | insinto ${GD_INSDIR}/${CTRL_NAME} |
151 | insinto ${GD_INSDIR}/${CTRL_NAME} |
| 152 | |
152 | |