wok-6.x annotate wbar/receipt @ rev 2908
Up: ffmpeg, ffmpeg-dev for mplayer-svn and improve kino hack
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Wed May 06 13:09:23 2009 +0000 (2009-05-06) |
parents | |
children | 4f6c9d697c58 |
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" |
pascal@2819 | 12 BUILD_DEPENDS="imlib2-dev imagemagick" |
pascal@2819 | 13 CONFIG_FILES="/etc/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 |
pascal@2819 | 19 make |
pascal@2819 | 20 mkdir -p _pkg/usr/share/wbar/iconpack _pkg/usr/bin |
pascal@2819 | 21 cp wbar _pkg/usr/bin |
pascal@2819 | 22 cp iconpack/wbar.osx/osxbarback.png _pkg/usr/share/wbar/iconpack |
pascal@2819 | 23 for i in firefox psi gimp xmms ; do |
pascal@2819 | 24 convert iconpack/wbar.osx/$i.png -resize 48x48 \ |
pascal@2819 | 25 _pkg/usr/share/wbar/iconpack/$i.png |
pascal@2819 | 26 done |
pascal@2819 | 27 cp ../stuff/*.png _pkg/usr/share/wbar/iconpack |
pascal@2819 | 28 } |
pascal@2819 | 29 |
pascal@2819 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2819 | 31 genpkg_rules() |
pascal@2819 | 32 { |
pascal@2819 | 33 mkdir -p $fs/etc |
pascal@2819 | 34 cp -a $_pkg/usr $fs |
pascal@2819 | 35 ln -s /etc/dot.wbar $fs/usr/share/wbar/dot.wbar |
pascal@2819 | 36 touch $fs/etc/dot.wbar |
pascal@2819 | 37 } |
pascal@2819 | 38 |
pascal@2819 | 39 # Post install/remove commands for Tazpkg. |
pascal@2819 | 40 post_install() |
pascal@2819 | 41 { |
pascal@2819 | 42 [ -s $1/etc/dot.wbar ] || rm -f $1/etc/dot.wbar |
pascal@2819 | 43 mv $1/etc/dot.wbar $1/etc/dot.wbar.old 2> /dev/null && cat <<EOT |
pascal@2819 | 44 -------- |
pascal@2819 | 45 Your old wbar configuration is saved into /etc/dot.wbar.old |
pascal@2819 | 46 -------- |
pascal@2819 | 47 EOT |
pascal@2819 | 48 cat > $1/etc/dot.wbar << EOT |
pascal@2819 | 49 # The Bar && Font |
pascal@2819 | 50 i: /usr/share/wbar/iconpack/osxbarback.png |
pascal@2819 | 51 t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12 |
pascal@2819 | 52 c: |
pascal@2819 | 53 |
pascal@2819 | 54 EOT |
pascal@2819 | 55 while read icon exe text; do |
pascal@2819 | 56 [ -x $exe ] || continue |
pascal@2819 | 57 cat >> $1/etc/dot.wbar << EOT |
pascal@2819 | 58 i: $icon |
pascal@2819 | 59 c: $exe |
pascal@2819 | 60 t: $text |
pascal@2819 | 61 |
pascal@2819 | 62 EOT |
pascal@2819 | 63 done << EOT |
pascal@2819 | 64 /usr/share/wbar/iconpack/firefox.png /usr/bin/firefox firefox |
pascal@2819 | 65 /usr/share/wbar/iconpack/psi.png /usr/bin/pidgin pidgin |
pascal@2819 | 66 /usr/share/wbar/iconpack/gimp.png /usr/bin/gimp gimp |
pascal@2819 | 67 /usr/share/wbar/iconpack/xmms.png /usr/bin/audacious audacious |
pascal@2819 | 68 /usr/share/wbar/iconpack/xterm.png /usr/bin/xterm xterm |
pascal@2819 | 69 EOT |
pascal@2819 | 70 [ -n "$1" ] || wbar -above-desk -pos top & |
pascal@2819 | 71 } |