summaryrefslogtreecommitdiff
path: root/desktop/wbar/wbar.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/wbar/wbar.SlackBuild')
-rw-r--r--desktop/wbar/wbar.SlackBuild61
1 files changed, 48 insertions, 13 deletions
diff --git a/desktop/wbar/wbar.SlackBuild b/desktop/wbar/wbar.SlackBuild
index 3c22022eab..191294a6fb 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}