wok-6.x annotate wbar/receipt @ rev 4702

squashfs: add lzma support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jan 03 18:38:54 2010 +0100 (2010-01-03)
parents cfba44c15c99
children 35ec83c60e58
rev   line source
pascal@2819 1 # SliTaz package receipt.
pascal@2819 2
pascal@2819 3 PACKAGE="wbar"
pascal@2819 4 VERSION="1.3.3"
pascal@2819 5 CATEGORY="system-tools"
pascal@2819 6 SHORT_DESC="Quick launch bar."
pascal@2819 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@2819 8 TARBALL="$PACKAGE-$VERSION.tbz2"
pascal@2819 9 WEB_SITE="http://code.google.com/p/wbar/"
pascal@2819 10 WGET_URL="http://www.tecapli.com.ar/warlock/$TARBALL"
pascal@2819 11 DEPENDS="imlib2 ttf-dejavu"
pankso@3094 12 BUILD_DEPENDS="imlib2-dev"
pankso@3094 13 CONFIG_FILES="/etc/wbar/dot.wbar"
pascal@2819 14
pascal@2819 15 # Rules to configure and make the package.
pascal@2819 16 compile_rules()
pascal@2819 17 {
pascal@2819 18 cd $src
pankso@3094 19 patch -p0 < ../stuff/gcc43_fixes.diff || exit 1
pankso@3094 20 make &&
pankso@3094 21 mkdir -p _pkg/usr/share/wbar/iconpack _pkg/usr/bin &&
pankso@3094 22 cp wbar _pkg/usr/bin &&
pascal@2819 23 cp iconpack/wbar.osx/osxbarback.png _pkg/usr/share/wbar/iconpack
pascal@2819 24 }
pascal@2819 25
pascal@2819 26 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2819 27 genpkg_rules()
pascal@2819 28 {
pankso@3094 29 mkdir -p $fs/etc/wbar
pascal@2819 30 cp -a $_pkg/usr $fs
pankso@3094 31 ln -s /etc/wbar/dot.wbar $fs/usr/share/wbar/dot.wbar
pankso@3094 32 touch $fs/etc/wbar/dot.wbar
pascal@2819 33 }
pascal@2819 34
pascal@2819 35 # Post install/remove commands for Tazpkg.
pascal@2819 36 post_install()
pascal@2819 37 {
pankso@3094 38 rm -f $1/etc/dot.wbar
pankso@3094 39 [ -s $1/etc/wbar/dot.wbar ] || rm -f $1/etc/wbar/dot.wbar
pankso@3094 40 mv $1/etc/wbar/dot.wbar $1/etc/wbar/dot.wbar.old 2> /dev/null && cat <<EOT
pascal@2819 41 --------
pankso@3094 42 Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
pascal@2819 43 --------
pascal@2819 44 EOT
pankso@3094 45 cat > $1/etc/wbar/dot.wbar << EOT
pascal@2819 46 # The Bar && Font
pascal@2819 47 i: /usr/share/wbar/iconpack/osxbarback.png
pascal@2819 48 t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
pascal@2819 49 c:
pascal@2819 50
pascal@2819 51 EOT
pascal@2819 52 while read icon exe text; do
pascal@2819 53 [ -x $exe ] || continue
pankso@3094 54 cat >> $1/etc/wbar/dot.wbar << EOT
pascal@2819 55 i: $icon
pascal@2819 56 c: $exe
pascal@2819 57 t: $text
pascal@2819 58
pascal@2819 59 EOT
pascal@2819 60 done << EOT
pankso@3094 61 /usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
pankso@3094 62 /usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
pankso@3094 63 /usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
pankso@3094 64 /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
pankso@3094 65 /usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
pankso@3094 66 /usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
pascal@2819 67 EOT
pankso@3094 68 grep -q 'wbar' $1/etc/xdg/openbox/autostart.sh ||
pankso@3094 69 cat >> $1/etc/xdg/openbox/autostart.sh << EOT
pankso@3094 70
pankso@3094 71 # Wbar icons panel.
pankso@3094 72 (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
pankso@3094 73 EOT
pascal@2819 74 }
pankso@3094 75
pankso@3094 76 post_remove()
pankso@3094 77 {
pankso@3094 78 sed -i '/Wbar/ d' $1/etc/xdg/openbox/autostart.sh
pankso@3094 79 sed -i '/wbar/ d' $1/etc/xdg/openbox/autostart.sh
pankso@3094 80 }