wok-next view wbar/receipt @ rev 20607

perdition: up 2.2
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Apr 19 15:57:59 2018 +0300 (2018-04-19)
parents 9e01bc6321ea
children d6378d455338
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 patch -p0 < $stuff/gcc43_fixes.diff || return 1
18 sed -i 's|^LDFLAGS.*|& -lX11|' Makefile
19 make || return 1
21 mkdir -p \
22 $install/usr/share/wbar/iconpack/ \
23 $install/usr/bin/ \
24 $install/etc/wbar/
25 cp wbar $install/usr/bin/
26 cp iconpack/wbar.osx/osxbarback.png $install/usr/share/wbar/iconpack/
27 ln -s /etc/wbar/dot.wbar $install/usr/share/wbar/dot.wbar
28 touch $install/etc/wbar/dot.wbar
29 }
31 genpkg_rules() {
32 copy @std
33 DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
34 CONFIG_FILES="/etc/wbar/dot.wbar"
35 TAGS="desktop launchbar"
36 }
38 post_install() {
39 rm -f "$1/etc/dot.wbar"
40 [ -s "$1/etc/wbar/dot.wbar" ] || rm -f "$1/etc/wbar/dot.wbar"
42 mv "$1/etc/wbar/dot.wbar" "$1/etc/wbar/dot.wbar.old" 2>/dev/null &&
43 cat <<EOT
44 --------
45 Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
46 --------
47 EOT
49 cat > "$1/etc/wbar/dot.wbar" <<EOT
50 # The Bar && Font
51 i: /usr/share/wbar/iconpack/osxbarback.png
52 t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
53 c:
55 EOT
57 while read icon exe text; do
58 [ -x $exe ] || continue
59 cat >> "$1/etc/wbar/dot.wbar" <<EOT
60 i: $icon
61 c: $exe
62 t: $text
64 EOT
65 done <<EOT
66 /usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
67 /usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
68 /usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
69 /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
70 /usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
71 /usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
72 EOT
74 grep -q 'wbar' "$1/etc/xdg/openbox/autostart.sh" ||
75 cat >> "$1/etc/xdg/openbox/autostart.sh" <<EOT
77 # Wbar icons panel.
78 (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
79 EOT
80 }
82 post_remove() {
83 sed -i '/Wbar/d; /wbar/d' "$1/etc/xdg/openbox/autostart.sh"
84 }