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

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