From: Alex Ferguson Date: Mon, 15 Nov 2010 19:07:12 +0000 (+0200) Subject: dzen2: Modify dzen-extras, update Makefile and recipe. X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95a71d22c858715179161121cb81c3c99daa909a;p=openembedded.git dzen2: Modify dzen-extras, update Makefile and recipe. Modularized the battery applet by moving the charge calculation in an external script and adding per-platform functions. Made the process a bit more efficient by adding a small program written in C, dzen-battery, which calculates a battery percentage given two standard files in /sys/class/power_supply and by moving processes outside the main loop when they only need to run once. Modified Makefile for dzen-battery.c Bumped PR on dzen2-svn Signed-off-by: Alex Ferguson Signed-off-by: Kristoffer Ericson --- diff --git a/recipes/dzen2/dzen2_svn.bb b/recipes/dzen2/dzen2_svn.bb index 893a5778b2..fa1072483b 100644 --- a/recipes/dzen2/dzen2_svn.bb +++ b/recipes/dzen2/dzen2_svn.bb @@ -5,7 +5,7 @@ RDEPENDS = "ttf-dejavu-sans xrandr" SRCREV = "271" PV = "0.8.5+svnr${SRCPV}" -PR = "r1" +PR = "r2" SRC_URI = "svn://dzen.googlecode.com/svn/;module=trunk;proto=http \ file://dzen-extras.tar.gz \ diff --git a/recipes/dzen2/files/Makefile b/recipes/dzen2/files/Makefile index 4e3525a176..4bafbcbd80 100644 --- a/recipes/dzen2/files/Makefile +++ b/recipes/dzen2/files/Makefile @@ -6,7 +6,7 @@ include config.mk SRC = draw.c main.c util.c action.c OBJ = ${SRC:.c=.o} -all: options dzen2 +all: options dzen2 dzen-battery options: @echo dzen2 build options: @@ -24,6 +24,10 @@ dzen2: ${OBJ} @echo CC -o $@ @${CC} -o $@ ${OBJ} ${LDFLAGS} ${LIBS} +dzen-battery: dzen-battery.c + @${CC} -c ${CFLAGS} dzen-battery.c + @${CC} -o dzen-battery dzen-battery.o ${LDFLAGS} + clean: @echo cleaning @rm -f dzen2 ${OBJ} dzen2-${VERSION}.tar.gz @@ -43,6 +47,8 @@ install: all @chmod 755 ${DESTDIR}${PREFIX}/bin/dzen2 @cp -f dzen-launcher ${DESTDIR}${PREFIX}/bin @chmod 755 ${DESTDIR}${PREFIX}/bin/dzen-launcher + @cp -f dzen-battery ${DESTDIR}${PREFIX}/bin + @chmod 755 ${DESTDIR}${PREFIX}/bin/dzen-battery @echo installing scripts to ${DESTDIR}${PREFIX}/share/dzen @mkdir -p ${DESTDIR}${PREFIX}/share/dzen/scripts @cp -f scripts/* ${DESTDIR}${PREFIX}/share/dzen/scripts diff --git a/recipes/dzen2/files/dzen-extras.tar.gz b/recipes/dzen2/files/dzen-extras.tar.gz index d57171404a..7a10757722 100644 Binary files a/recipes/dzen2/files/dzen-extras.tar.gz and b/recipes/dzen2/files/dzen-extras.tar.gz differ