wok-4.x annotate wbar/receipt @ rev 11146

Up: git to 1.7.7.1.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Oct 26 21:25:07 2011 +0000 (2011-10-26)
parents 940b5937e496
children
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"
erjo@9956 11 CONFIG_FILES="/etc/wbar/dot.wbar"
erjo@9956 12 TAGS="desktop launchbar"
erjo@9956 13
pascal@5007 14 DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
pankso@3094 15 BUILD_DEPENDS="imlib2-dev"
pascal@2819 16
pascal@2819 17 # Rules to configure and make the package.
pascal@2819 18 compile_rules()
pascal@2819 19 {
pascal@2819 20 cd $src
pascal@8974 21 patch -p0 < $stuff/gcc43_fixes.diff || return 1
pankso@3094 22 make &&
pankso@3094 23 mkdir -p _pkg/usr/share/wbar/iconpack _pkg/usr/bin &&
pankso@3094 24 cp wbar _pkg/usr/bin &&
pascal@2819 25 cp iconpack/wbar.osx/osxbarback.png _pkg/usr/share/wbar/iconpack
pascal@2819 26 }
pascal@2819 27
pascal@2819 28 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2819 29 genpkg_rules()
pascal@2819 30 {
pankso@3094 31 mkdir -p $fs/etc/wbar
pascal@2819 32 cp -a $_pkg/usr $fs
pankso@3094 33 ln -s /etc/wbar/dot.wbar $fs/usr/share/wbar/dot.wbar
pankso@3094 34 touch $fs/etc/wbar/dot.wbar
pascal@2819 35 }
pascal@2819 36
pascal@2819 37 # Post install/remove commands for Tazpkg.
pascal@2819 38 post_install()
pascal@2819 39 {
pankso@3094 40 rm -f $1/etc/dot.wbar
pankso@3094 41 [ -s $1/etc/wbar/dot.wbar ] || rm -f $1/etc/wbar/dot.wbar
pankso@3094 42 mv $1/etc/wbar/dot.wbar $1/etc/wbar/dot.wbar.old 2> /dev/null && cat <<EOT
pascal@2819 43 --------
pankso@3094 44 Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
pascal@2819 45 --------
pascal@2819 46 EOT
pankso@3094 47 cat > $1/etc/wbar/dot.wbar << EOT
pascal@2819 48 # The Bar && Font
pascal@2819 49 i: /usr/share/wbar/iconpack/osxbarback.png
pascal@2819 50 t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
pascal@2819 51 c:
pascal@2819 52
pascal@2819 53 EOT
pascal@2819 54 while read icon exe text; do
pascal@2819 55 [ -x $exe ] || continue
pankso@3094 56 cat >> $1/etc/wbar/dot.wbar << EOT
pascal@2819 57 i: $icon
pascal@2819 58 c: $exe
pascal@2819 59 t: $text
pascal@2819 60
pascal@2819 61 EOT
pascal@2819 62 done << EOT
pankso@3094 63 /usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
pankso@3094 64 /usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
pankso@3094 65 /usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
pankso@3094 66 /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
pankso@3094 67 /usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
pankso@3094 68 /usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
pascal@2819 69 EOT
pankso@3094 70 grep -q 'wbar' $1/etc/xdg/openbox/autostart.sh ||
pankso@3094 71 cat >> $1/etc/xdg/openbox/autostart.sh << EOT
pankso@3094 72
pankso@3094 73 # Wbar icons panel.
pankso@3094 74 (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
pankso@3094 75 EOT
pascal@2819 76 }
pankso@3094 77
pankso@3094 78 post_remove()
pankso@3094 79 {
pankso@3094 80 sed -i '/Wbar/ d' $1/etc/xdg/openbox/autostart.sh
pankso@3094 81 sed -i '/wbar/ d' $1/etc/xdg/openbox/autostart.sh
pankso@3094 82 }