wok view wbar/receipt @ rev 3356

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