| 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.15 2007/10/16 22:46:31 nixphoeni Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gdesklets.eclass,v 1.16 2008/02/19 01:51:00 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: |
| … | |
… | |
| 63 | # First, install the Sensor (if there is one) |
63 | # First, install the Sensor (if there is one) |
| 64 | if [[ -n "${SENSOR_NAME}" ]]; then |
64 | if [[ -n "${SENSOR_NAME}" ]]; then |
| 65 | for SENS in ${SENSOR_NAME[@]}; do |
65 | for SENS in ${SENSOR_NAME[@]}; do |
| 66 | einfo "Installing Sensor ${SENS}" |
66 | einfo "Installing Sensor ${SENS}" |
| 67 | /usr/bin/python "Install_${SENS}_Sensor.bin" \ |
67 | /usr/bin/python "Install_${SENS}_Sensor.bin" \ |
| 68 | --nomsg ${D}${GDESKLETS_INST_DIR}/Sensors || \ |
68 | --nomsg "${D}${GDESKLETS_INST_DIR}/Sensors" || \ |
| 69 | die "Couldn't Install Sensor" |
69 | die "Couldn't Install Sensor" |
| 70 | |
70 | |
| 71 | chown -R root:0 ${D}${GDESKLETS_INST_DIR}/Sensors/${SENSOR_NAME} |
71 | chown -R root:0 "${D}${GDESKLETS_INST_DIR}/Sensors/${SENSOR_NAME}" |
| 72 | done # for in ${SENSOR_NAME} |
72 | done # for in ${SENSOR_NAME} |
| 73 | fi # if -n "${SENSOR_NAME}" |
73 | fi # if -n "${SENSOR_NAME}" |
| 74 | |
74 | |
| 75 | debug-print-section display_install |
75 | debug-print-section display_install |
| 76 | # This finds the Displays |
76 | # This finds the Displays |
| … | |
… | |
| 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 | |
| 108 | # For each one of the scripts, change to its |
108 | # For each one of the scripts, change to its |
| … | |
… | |
| 158 | # There are possibly multiple Controls packaged with the display. |
158 | # There are possibly multiple Controls packaged with the display. |
| 159 | # For each __init__.py found, there must be a Control associated with it. |
159 | # For each __init__.py found, there must be a Control associated with it. |
| 160 | for CTRL in ${CONTROL_INITS[@]}; do |
160 | for CTRL in ${CONTROL_INITS[@]}; do |
| 161 | |
161 | |
| 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}" |