wok-4.x rev 3094

wbar: Use installed icons and have configs in /etc/wbar (FSH)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 17 00:53:23 2009 +0200 (2009-05-17)
parents c440f0b24bb4
children 5423531975be
files wbar/receipt
line diff
     1.1 --- a/wbar/receipt	Sun May 17 00:38:37 2009 +0200
     1.2 +++ b/wbar/receipt	Sun May 17 00:53:23 2009 +0200
     1.3 @@ -9,43 +9,40 @@
     1.4  WEB_SITE="http://code.google.com/p/wbar/"
     1.5  WGET_URL="http://www.tecapli.com.ar/warlock/$TARBALL"
     1.6  DEPENDS="imlib2 ttf-dejavu"
     1.7 -BUILD_DEPENDS="imlib2-dev imagemagick"
     1.8 -CONFIG_FILES="/etc/dot.wbar"
     1.9 +BUILD_DEPENDS="imlib2-dev"
    1.10 +CONFIG_FILES="/etc/wbar/dot.wbar"
    1.11  
    1.12  # Rules to configure and make the package.
    1.13  compile_rules()
    1.14  {
    1.15  	cd $src
    1.16 -	make
    1.17 -	mkdir -p _pkg/usr/share/wbar/iconpack _pkg/usr/bin
    1.18 -	cp wbar _pkg/usr/bin
    1.19 +	patch -p0 < ../stuff/gcc43_fixes.diff || exit 1
    1.20 +	make &&
    1.21 +	mkdir -p _pkg/usr/share/wbar/iconpack _pkg/usr/bin &&
    1.22 +	cp wbar _pkg/usr/bin &&
    1.23  	cp iconpack/wbar.osx/osxbarback.png _pkg/usr/share/wbar/iconpack
    1.24 -	for i in firefox psi gimp xmms ; do
    1.25 -		convert iconpack/wbar.osx/$i.png -resize 48x48 \
    1.26 -			_pkg/usr/share/wbar/iconpack/$i.png
    1.27 -	done
    1.28 -	cp ../stuff/*.png _pkg/usr/share/wbar/iconpack
    1.29  }
    1.30  
    1.31  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.32  genpkg_rules()
    1.33  {
    1.34 -	mkdir -p $fs/etc
    1.35 +	mkdir -p $fs/etc/wbar
    1.36  	cp -a $_pkg/usr $fs
    1.37 -	ln -s /etc/dot.wbar $fs/usr/share/wbar/dot.wbar
    1.38 -	touch $fs/etc/dot.wbar	
    1.39 +	ln -s /etc/wbar/dot.wbar $fs/usr/share/wbar/dot.wbar
    1.40 +	touch $fs/etc/wbar/dot.wbar
    1.41  }
    1.42  
    1.43  # Post install/remove commands for Tazpkg.
    1.44  post_install()
    1.45  {
    1.46 -	[ -s $1/etc/dot.wbar ] || rm -f $1/etc/dot.wbar
    1.47 -	mv $1/etc/dot.wbar $1/etc/dot.wbar.old 2> /dev/null && cat <<EOT
    1.48 +	rm -f $1/etc/dot.wbar
    1.49 +	[ -s $1/etc/wbar/dot.wbar ] || rm -f $1/etc/wbar/dot.wbar
    1.50 +	mv $1/etc/wbar/dot.wbar $1/etc/wbar/dot.wbar.old 2> /dev/null && cat <<EOT
    1.51  --------
    1.52 -Your old wbar configuration is saved into /etc/dot.wbar.old
    1.53 +Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
    1.54  --------
    1.55  EOT
    1.56 -	cat > $1/etc/dot.wbar << EOT
    1.57 +	cat > $1/etc/wbar/dot.wbar << EOT
    1.58  # The Bar && Font
    1.59  i: /usr/share/wbar/iconpack/osxbarback.png
    1.60  t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
    1.61 @@ -54,18 +51,30 @@
    1.62  EOT
    1.63  	while read icon exe text; do
    1.64  		[ -x $exe ] || continue
    1.65 -		cat >> $1/etc/dot.wbar << EOT
    1.66 +		cat >> $1/etc/wbar/dot.wbar << EOT
    1.67  i: $icon
    1.68  c: $exe
    1.69  t: $text
    1.70  
    1.71  EOT
    1.72  	done << EOT
    1.73 -/usr/share/wbar/iconpack/firefox.png /usr/bin/firefox firefox
    1.74 -/usr/share/wbar/iconpack/psi.png /usr/bin/pidgin pidgin
    1.75 -/usr/share/wbar/iconpack/gimp.png /usr/bin/gimp gimp
    1.76 -/usr/share/wbar/iconpack/xmms.png /usr/bin/audacious audacious
    1.77 -/usr/share/wbar/iconpack/xterm.png /usr/bin/xterm xterm
    1.78 +/usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
    1.79 +/usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
    1.80 +/usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
    1.81 +/usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
    1.82 +/usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
    1.83 +/usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
    1.84  EOT
    1.85 -	[ -n "$1" ] || wbar -above-desk -pos top &
    1.86 +	grep -q 'wbar' $1/etc/xdg/openbox/autostart.sh ||
    1.87 +	cat >> $1/etc/xdg/openbox/autostart.sh << EOT
    1.88 +
    1.89 +# Wbar icons panel.
    1.90 +(sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
    1.91 +EOT
    1.92  }
    1.93 +
    1.94 +post_remove()
    1.95 +{
    1.96 +	sed -i '/Wbar/ d' $1/etc/xdg/openbox/autostart.sh
    1.97 +	sed -i '/wbar/ d' $1/etc/xdg/openbox/autostart.sh
    1.98 +}