From 45004f6b09a941c80958701e2a1f03ab434e183f Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Mon, 20 Sep 2010 20:25:50 -0400 Subject: desktop/lxpanel: Updated for version 0.5.6. Signed-off-by: dsomero --- desktop/lxpanel/README | 2 + desktop/lxpanel/battery-applet.patch | 31 +++++++++++ desktop/lxpanel/config.diff | 9 ---- desktop/lxpanel/doinst.sh | 11 ++-- desktop/lxpanel/lxpanel.SlackBuild | 47 ++++++++++------ desktop/lxpanel/lxpanel.info | 10 ++-- desktop/lxpanel/panel.in.diff | 21 -------- desktop/lxpanel/panel.patch | 101 +++++++++++++++++++++++++++++++++++ desktop/lxpanel/slack-desc | 14 ++--- 9 files changed, 181 insertions(+), 65 deletions(-) create mode 100644 desktop/lxpanel/battery-applet.patch delete mode 100644 desktop/lxpanel/config.diff delete mode 100644 desktop/lxpanel/panel.in.diff create mode 100644 desktop/lxpanel/panel.patch (limited to 'desktop/lxpanel') diff --git a/desktop/lxpanel/README b/desktop/lxpanel/README index 14dd8a5e8a..8c0fda783c 100644 --- a/desktop/lxpanel/README +++ b/desktop/lxpanel/README @@ -1 +1,3 @@ LXPanel is a NETWM/EWMH compliant lightweight X11 desktop panel. + +This requires lxmenu-data and menu-cache. diff --git a/desktop/lxpanel/battery-applet.patch b/desktop/lxpanel/battery-applet.patch new file mode 100644 index 0000000000..c2f5b93007 --- /dev/null +++ b/desktop/lxpanel/battery-applet.patch @@ -0,0 +1,31 @@ +From 93d9373574fcb0ed63cc4be7807343b018daad1a Mon Sep 17 00:00:00 2001 +From: Marty Jack +Date: Thu, 19 Aug 2010 22:52:44 -0400 +Subject: [PATCH] Battery percentage incorrectly always evaluates as 100 percent (Bug3006059) + +--- + src/plugins/batt/batt_sys.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/batt/batt_sys.c b/src/plugins/batt/batt_sys.c +index 3c325b8..2ece803 100644 +--- a/src/plugins/batt/batt_sys.c ++++ b/src/plugins/batt/batt_sys.c +@@ -150,7 +150,7 @@ void battery_update( battery *b ) { + b->state = "available"; + } + else if ( strcmp("energy_now", sys_file ) == 0 ) { +- b->remaining_capacity = get_unit_value((gchar*) file_content) / 1000; ++ b->remaining_energy = get_unit_value((gchar*) file_content) / 1000; + if (!b->state) + b->state = "available"; + } +@@ -215,7 +215,7 @@ void battery_update( battery *b ) { + if (b->last_capacity < MIN_CAPACITY) + b->percentage = 0; + else +- b->percentage = b->remaining_capacity * 100 / b->last_capacity; ++ b->percentage = ((float) b->remaining_energy * 100.0) / (float) b->last_capacity_unit; + + if (b->percentage > 100) + b->percentage = 100; diff --git a/desktop/lxpanel/config.diff b/desktop/lxpanel/config.diff deleted file mode 100644 index 64f2ea3420..0000000000 --- a/desktop/lxpanel/config.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- data/default/config~ 2008-06-25 16:51:53.000000000 +0200 -+++ data/default/config 2008-06-25 16:52:38.000000000 +0200 -@@ -1,4 +1,4 @@ - [Command] --FileManager=pcmanfm %s --Terminal=xterm -e -+FileManager=thunar %s -+Terminal=Terminal -e - diff --git a/desktop/lxpanel/doinst.sh b/desktop/lxpanel/doinst.sh index b0778a9cb9..ac258d3ee7 100644 --- a/desktop/lxpanel/doinst.sh +++ b/desktop/lxpanel/doinst.sh @@ -1,16 +1,15 @@ -#!/bin/sh - config() { NEW="$1" - OLD="`dirname $NEW`/`basename $NEW .new`" + OLD="$(dirname $NEW)/$(basename $NEW .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD - elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy rm $NEW fi # Otherwise, we leave the .new copy for the admin to consider... } -config usr/share/lxpanel/profile/default/panels/panel.new -config usr/share/lxpanel/profile/default/config.new +config usr/share/lxpanel/profile/default/panels/panel.new +config usr/share/lxpanel/profile/default/config.new diff --git a/desktop/lxpanel/lxpanel.SlackBuild b/desktop/lxpanel/lxpanel.SlackBuild index a0bb73a30d..bd2faf7883 100644 --- a/desktop/lxpanel/lxpanel.SlackBuild +++ b/desktop/lxpanel/lxpanel.SlackBuild @@ -1,5 +1,5 @@ #!/bin/sh -# +# # Slackware build script for lxpanel # (C) 2008 Michael Wagner # All rights reserved. @@ -20,9 +20,11 @@ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# modified by ponce PRGNAM=lxpanel -VERSION=0.3.8.1 +VERSION=0.5.6 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -61,34 +63,38 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP +cd $TMP rm -rf $PRGNAM-$VERSION -tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +tar -xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION chown -R root:root . -find . -perm 777 -exec chmod 755 {} \; +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; -# Patch config and panel.in to use programs included in Slackware -patch -p0 < $CWD/config.diff -patch -p0 < $CWD/panel.in.diff +# fix a battery applet issue: +patch -p1 < $CWD/battery-applet.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --localstatedir=/var \ --sysconfdir=/etc \ - --mandir=/usr/man - + --enable-man \ + --mandir=/usr/man \ + --program-prefix= \ + --program-suffix= \ + --build=$ARCH-slackware-linux + make -make install-strip DESTDIR=$PKG +make install-strip DESTDIR=$PKG -gzip -9 $PKG/usr/man/man1/*.1 > /dev/null - -# Don't overwrite the default configuration files. -for i in config panels/panel; do - mv $PKG/usr/share/$PRGNAM/profile/default/$i $PKG/usr/share/$PRGNAM/profile/default/$i.new -done +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION @@ -100,4 +106,11 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG +# Patch panel to use programs included in Slackware and slight default config +patch -p0 < $CWD/panel.patch +# Don't overwrite the default configuration files. +for i in config panels/panel; do + mv $PKG/usr/share/$PRGNAM/profile/default/$i $PKG/usr/share/$PRGNAM/profile/default/$i.new +done + /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/desktop/lxpanel/lxpanel.info b/desktop/lxpanel/lxpanel.info index 4ada9992d3..3c92b2e033 100644 --- a/desktop/lxpanel/lxpanel.info +++ b/desktop/lxpanel/lxpanel.info @@ -1,10 +1,10 @@ PRGNAM="lxpanel" -VERSION="0.3.8.1" -HOMEPAGE="http://lxde.org" -DOWNLOAD="http://downloads.sourceforge.net/lxde/lxpanel-0.3.8.1.tar.gz" -MD5SUM="18b03bd5556d14b8bd1adf00f4e95574" +VERSION="0.5.6" +HOMEPAGE="http://wiki.lxde.org/en/LXPanel" +DOWNLOAD="http://download.sourceforge.net/lxde/lxpanel-0.5.6.tar.gz" +MD5SUM="3c6b5498b5f4109c3913b10a66809fe6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="Michael Wagner" EMAIL="lapinours@web.de" -APPROVED="David Somero" +APPROVED="dsomero" diff --git a/desktop/lxpanel/panel.in.diff b/desktop/lxpanel/panel.in.diff deleted file mode 100644 index 3266c18d9a..0000000000 --- a/desktop/lxpanel/panel.in.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- data/default/panels/panel.in~ 2008-06-25 16:35:25.000000000 +0200 -+++ data/default/panels/panel.in 2008-06-25 16:37:47.000000000 +0200 -@@ -50,14 +50,15 @@ - type = launchbar - Config { - Button { -- id=pcmanfm.desktop -+ id=mozilla-firefox.desktop - } - Button { -- id=gnome-terminal.desktop -+ id=mozilla-thunderbird.desktop - } - Button { -- id=firefox.desktop -+ id=Terminal.desktop - } -+ - } - } - diff --git a/desktop/lxpanel/panel.patch b/desktop/lxpanel/panel.patch new file mode 100644 index 0000000000..60bc0f113f --- /dev/null +++ b/desktop/lxpanel/panel.patch @@ -0,0 +1,101 @@ +--- usr/share/lxpanel/profile/default/panels/panel.orig 2010-08-19 00:16:51.000000000 +0200 ++++ usr/share/lxpanel/profile/default/panels/panel 2010-08-18 23:58:42.239083001 +0200 +@@ -3,10 +3,10 @@ + + Global { + edge=bottom +- allign=left ++ allign=center + margin=0 + widthtype=percent +- width=100 ++ width=95 + height=26 + transparent=0 + tintcolor=#000000 +@@ -53,10 +53,13 @@ + id=pcmanfm.desktop + } + Button { +- id=gnome-terminal.desktop ++ id=mozilla-firefox.desktop + } + Button { +- id=firefox.desktop ++ id=mozilla-thunderbird.desktop ++ } ++ Button { ++ id=lxterminal.desktop + } + } + } +@@ -113,11 +116,44 @@ + } + + Plugin { ++ type = volumealsa ++} ++ ++Plugin { ++ type = space ++ Config { ++ Size=4 ++ } ++} ++ ++Plugin { ++ type = netstatus ++ Config { ++ iface=eth0 ++ configtool=network-admin --configure %i ++ } ++} ++ ++Plugin { ++ type = space ++ Config { ++ Size=4 ++ } ++} ++ ++Plugin { + type = cpu + } + + Plugin { +- type = tray ++ type = space ++ Config { ++ Size=4 ++ } ++} ++ ++Plugin { ++ type = cpufreq + } + + Plugin { +@@ -126,6 +162,23 @@ + ClockFmt=%R + TooltipFmt=%A %x + BoldFont=0 ++ IconOnly=0 ++ } ++} ++ ++Plugin { ++ type = space ++ Config { ++ Size=4 ++ } ++} ++ ++Plugin { ++ type = launchbar ++ Config { ++ Button { ++ id=lxde-logout.desktop ++ } + } + } + diff --git a/desktop/lxpanel/slack-desc b/desktop/lxpanel/slack-desc index 7da8a79c95..ec0dbbe7f7 100644 --- a/desktop/lxpanel/slack-desc +++ b/desktop/lxpanel/slack-desc @@ -9,11 +9,11 @@ lxpanel: LXpanel (NETWM/EWMH compliant lightweight x11 desktop panel) lxpanel: lxpanel: Based on fbpanel, lxpanel provides an application menu generated from -lxpanel: .desktop files as well as a launchbar, taskbar and various plugins. -lxpanel: +lxpanel: desktop files as well as a launchbar, taskbar and various plugins. +lxpanel: lxpanel: Homepage: http://lxde.org -lxpanel: -lxpanel: -lxpanel: -lxpanel: -lxpanel: +lxpanel: +lxpanel: +lxpanel: +lxpanel: +lxpanel: -- cgit v1.2.3