# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="This is a desktop applet that displays weather information and forecasts." HOMEPAGE="http://homepages.comnet.co.nz/~matt-sarah/" SRC_URI="http://www.message.co.nz/~matt-sarah/lwp-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="unicode" DEPEND=">=x11-misc/superkaramba-0.35" DIR_NAME="liquid_weather_plus" MY_DEST="/usr/share/karamba/themes/${DIR_NAME}" src_unpack() { unpack ${A} epatch ${FILESDIR}/${P}-translations.patch if use unicode; then cd "${WORKDIR}/${DIR_NAME}/" for FILE in translations/*; do NBRLINES=`cat ${FILE} | wc -l` TEMP=`grep -nx '' ${FILE}` IDX=`expr index $TEMP :` LINE=${TEMP:0:$((IDX-1))} NBRLINES2=$((NBRLINES-LINE + 1)) head -n ${LINE} ${FILE} > output tail -n ${NBRLINES2} ${FILE} | iconv -f ISO-8859-1 -t UTF-8 >> output mv output ${FILE} done fi } src_install() { cd "${WORKDIR}/${DIR_NAME}/" for DIR in . background icons/*/* wind_icons/* wind_icons/*/weak wind_icons/*/medium wind_icons/*/strong; do insinto "${MY_DEST}/${DIR}" doins "${DIR}"/*.png done insinto "${MY_DEST}/fonts" doins fonts/*.ttf insinto "${MY_DEST}/translations" doins translations/* insinto "${MY_DEST}" doins *.theme readme_faq.html *.pyc }