wok-next view wbar/receipt @ rev 20904
libgdata: update bdeps
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jul 30 23:44:42 2018 +0300 (2018-07-30) |
parents | da9e80c5d4bb |
children | 8e1b2a143eb3 |
line source
1 # SliTaz package receipt v2.
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 LICENSE="GPL"
9 WEB_SITE="http://code.google.com/p/wbar/"
11 TARBALL="$PACKAGE-$VERSION.tbz2"
12 WGET_URL="http://www.tecapli.com.ar/warlock/$TARBALL"
14 BUILD_DEPENDS="imlib2-dev xorg-libX11-dev"
16 compile_rules() {
17 sed -i 's|^LDFLAGS.*|& -lX11|' Makefile
18 make || return 1
20 mkdir -p \
21 $install/usr/share/wbar/iconpack/ \
22 $install/usr/bin/ \
23 $install/etc/wbar/
24 cp wbar $install/usr/bin/
25 cp iconpack/wbar.osx/osxbarback.png $install/usr/share/wbar/iconpack/
26 ln -s /etc/wbar/dot.wbar $install/usr/share/wbar/dot.wbar
27 touch $install/etc/wbar/dot.wbar
28 }
30 genpkg_rules() {
31 copy @std
32 DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
33 CONFIG_FILES="/etc/wbar/dot.wbar"
34 TAGS="desktop launchbar"
35 }
37 post_install() {
38 rm -f "$1/etc/dot.wbar"
39 [ -s "$1/etc/wbar/dot.wbar" ] || rm -f "$1/etc/wbar/dot.wbar"
41 mv "$1/etc/wbar/dot.wbar" "$1/etc/wbar/dot.wbar.old" 2>/dev/null &&
42 cat <<EOT
43 --------
44 Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
45 --------
46 EOT
48 cat > "$1/etc/wbar/dot.wbar" <<EOT
49 # The Bar && Font
50 i: /usr/share/wbar/iconpack/osxbarback.png
51 t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
52 c:
54 EOT
56 while read icon exe text; do
57 [ -x $exe ] || continue
58 cat >> "$1/etc/wbar/dot.wbar" <<EOT
59 i: $icon
60 c: $exe
61 t: $text
63 EOT
64 done <<EOT
65 /usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
66 /usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
67 /usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
68 /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
69 /usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
70 /usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
71 EOT
73 grep -q 'wbar' "$1/etc/xdg/openbox/autostart.sh" ||
74 cat >> "$1/etc/xdg/openbox/autostart.sh" <<EOT
76 # Wbar icons panel.
77 (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
78 EOT
79 }
81 post_remove() {
82 sed -i '/Wbar/d; /wbar/d' "$1/etc/xdg/openbox/autostart.sh"
83 }