aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/wbar/doinst.sh14
-rw-r--r--desktop/wbar/wbar-gcc430_and_warnings.patch46
-rw-r--r--desktop/wbar/wbar.SlackBuild61
-rw-r--r--desktop/wbar/wbar.cfg44
-rw-r--r--desktop/wbar/wbar.info10
5 files changed, 112 insertions, 63 deletions
diff --git a/desktop/wbar/doinst.sh b/desktop/wbar/doinst.sh
new file mode 100644
index 0000000000000..653892d729ae8
--- /dev/null
+++ b/desktop/wbar/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ 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
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/default/wbar/wbar.cfg.new
diff --git a/desktop/wbar/wbar-gcc430_and_warnings.patch b/desktop/wbar/wbar-gcc430_and_warnings.patch
deleted file mode 100644
index 61b7df7b9ebb0..0000000000000
--- a/desktop/wbar/wbar-gcc430_and_warnings.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -Naur wbar-1.3.3.orig/IconLoader.h wbar-1.3.3/IconLoader.h
---- wbar-1.3.3.orig/IconLoader.h 2006-10-20 02:25:01.000000000 +0300
-+++ wbar-1.3.3/IconLoader.h 2008-03-29 14:39:46.000000000 +0200
-@@ -4,6 +4,7 @@
- extern "C" {
- #include <sys/types.h>
- #include <regex.h>
-+#include <stdlib.h>
- };
-
- #include <fstream>
-diff -Naur wbar-1.3.3.orig/Main.cc wbar-1.3.3/Main.cc
---- wbar-1.3.3.orig/Main.cc 2007-08-06 15:28:11.000000000 +0300
-+++ wbar-1.3.3/Main.cc 2008-03-29 14:42:25.000000000 +0200
-@@ -82,7 +82,7 @@
- /*}}}*/
-
- /* window configuration *//*{{{*/
-- barwin.setName("wbar");
-+ barwin.setName((char *)"wbar");
- if( optparser.isset("above-desk") ){
- barwin.setDockWindow();
- barwin.skipTaskNPager();
-diff -Naur wbar-1.3.3.orig/SuperBar.h wbar-1.3.3/SuperBar.h
---- wbar-1.3.3.orig/SuperBar.h 2007-02-12 01:32:17.000000000 +0200
-+++ wbar-1.3.3/SuperBar.h 2008-03-29 14:39:57.000000000 +0200
-@@ -1,6 +1,7 @@
- #ifndef _SUPERBAR_H_
- #define _SUPERBAR_H_
-
-+#include <stdlib.h>
- #include "ImgWrap.h"
- #include "Bar.h"
-
-diff -Naur wbar-1.3.3.orig/XWin.cc wbar-1.3.3/XWin.cc
---- wbar-1.3.3.orig/XWin.cc 2007-01-26 21:15:59.000000000 +0200
-+++ wbar-1.3.3/XWin.cc 2008-03-29 14:40:16.000000000 +0200
-@@ -30,7 +30,7 @@
- /* Set WM Protocols to report window delete event */
- XSetWMProtocols(display, window, &delWindow, 1);
-
-- XClassHint ch = {"wbar", "wbar"};
-+ XClassHint ch = {(char *)"wbar", (char *)"wbar"};
- XSetClassHint(display, window, &ch);
- }
-
diff --git a/desktop/wbar/wbar.SlackBuild b/desktop/wbar/wbar.SlackBuild
index 3c22022eab6f5..191294a6fb7fb 100644
--- a/desktop/wbar/wbar.SlackBuild
+++ b/desktop/wbar/wbar.SlackBuild
@@ -1,6 +1,8 @@
#!/bin/sh
-# Copyright 2010 Binh Nguyen <binhnguyen@fastmail.fm>
+# Slackware build script for wbar
+
+# Copyright 2010-2011 Binh Nguyen <binhnguyen@fastmail.fm>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=wbar
-VERSION=${VERSION:-1.3.3}
+VERSION=${VERSION:-2.2.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -38,6 +40,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -eu
rm -rf $PKG
@@ -53,28 +69,47 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Apply a patch from Arch
-patch -p1 < $CWD/wbar-gcc430_and_warnings.patch
-
-make
+# Use absolute path for pidof (from Salix)
+sed -i 's|pidof|/sbin/pidof|g' src/config/Run.cc
-install -Dm755 wbar $PKG/usr/bin/wbar
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --localedir=/usr/share/locale \
+ --build=$ARCH-slackware-linux
-sed -i "s|i\: |i\: /usr/share/wbar/|" dot.wbar
-sed -i "s|t\: iconpack/wbar.osx/font/12|t\: /usr/share/wbar/iconpack/comic/12|" dot.wbar
-
-install -Dm644 dot.wbar $PKG/usr/share/wbar/dot.wbar
-cp -r iconpack $PKG/usr/share/wbar
+make
+make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+# Replace the heavily Debian-oriented default config file
+rm $PKG/etc/default/wbar/wbar.cfg
+cat $CWD/wbar.cfg > $PKG/etc/default/wbar/wbar.cfg.new
+# And supply an icon set for that config (from Salix)
+tar xvf $CWD/icons.tar.gz
+mkdir -p $PKG/usr/share/pixmaps/wbar/slack
+install -D -m 0644 icons/* $PKG/usr/share/pixmaps/wbar/slack
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING NEWS README gpl.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/desktop/wbar/wbar.cfg b/desktop/wbar/wbar.cfg
new file mode 100644
index 0000000000000..62d102b3df0bf
--- /dev/null
+++ b/desktop/wbar/wbar.cfg
@@ -0,0 +1,44 @@
+i: /usr/share/pixmaps/wbar/osxbarback.png
+c: wbar --bpress --above-desk --vbar --pos right
+t: /usr/share/fonts/TTF/DejaVuSans.ttf/10
+
+i: /usr/share/pixmaps/wbar/slack/terminal.png
+c: exo-open --launch TerminalEmulator
+t: Terminal
+
+i: /usr/share/pixmaps/wbar/slack/file-manager.png
+c: thunar
+t: File Manager
+
+i: /usr/share/pixmaps/wbar/slack/web-browser.png
+c: exo-open --launch WebBrowser
+t: Web Browser
+
+i: /usr/share/pixmaps/wbar/slack/mail-client.png
+c: exo-open --launch MailReader
+t: Mail Client
+
+i: /usr/share/pixmaps/wbar/pidgin.png
+c: pidgin
+t: Pidgin
+
+i: /usr/share/pixmaps/wbar/slack/text-editor.png
+c: mousepad
+t: Text Editor
+
+i: /usr/share/pixmaps/wbar/slack/image-editor.png
+c: gimp
+t: Image Editor
+
+i: /usr/share/pixmaps/wbar/slack/music-player.png
+c: audacious
+t: Music Player
+
+i: /usr/share/pixmaps/wbar/slack/media-player.png
+c: vlc
+t: Media Player
+
+i: /usr/share/pixmaps/wbar/slack/preferences.png
+c: wbar-config
+t: Preferences
+
diff --git a/desktop/wbar/wbar.info b/desktop/wbar/wbar.info
index 8715313bb7df9..1e36db5f9b0da 100644
--- a/desktop/wbar/wbar.info
+++ b/desktop/wbar/wbar.info
@@ -1,10 +1,12 @@
PRGNAM="wbar"
-VERSION="1.3.3"
+VERSION="2.2.2"
HOMEPAGE="http://code.google.com/p/wbar/"
-DOWNLOAD="http://wbar.googlecode.com/files/wbar-1.3.3.tbz2"
-MD5SUM="542335a273188de0d6a93102501351a4"
+DOWNLOAD="http://wbar.googlecode.com/files/wbar-2.2.2.tbz2 \
+ http://download.salixos.org/i486/13.37/source/xap/wbar/icons.tar.gz"
+MD5SUM="7ee752ad4f3268ccbc24ca72e463d847 \
+ 358ea5ad109751ad64e78d440d0e4dca"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Binh Nguyen"
EMAIL="binhnguyen@fastmail.fm"
-APPROVED="dsomero"
+APPROVED="dsomero,Niels Horn"