wok view wbar/receipt @ rev 25647

Backout salvador 10% speedup: crashes with large files
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 26 12:15:51 2024 +0000 (9 months ago)
parents 5a92a26adcc1
children c965782a38e0
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 LICENSE="GPL"
9 TARBALL="$PACKAGE-$VERSION.tbz2"
10 WEB_SITE="https://github.com/rodolf0/wbar"
11 WGET_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/wbar/dot.wbar"
13 TAGS="desktop launchbar"
15 DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
16 BUILD_DEPENDS="imlib2-dev"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - $WEB_SITE/commits/dev-3.0 2>/dev/null | \
22 sed '/Commits on/!d;s|.*on |"|;s|<.*|"|;q' | xargs date +%Y%m%d -d
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 patch -p0 < $stuff/gcc43_fixes.diff || return 1
29 sed -i 's|^LDFLAGS.*|& -lX11|' Makefile
30 which imlib2-config ||
31 sed -i -e 's|imlib2-config --cflags|pkg-config --cflags imlib2|' \
32 -e 's|imlib2-config --libs|pkg-config --libs imlib2|' Makefile
33 make &&
34 mkdir -p $DESTDIR/usr/share/wbar/iconpack $DESTDIR/usr/bin &&
35 cp wbar $DESTDIR/usr/bin &&
36 cp iconpack/wbar.osx/osxbarback.png $DESTDIR/usr/share/wbar/iconpack
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/etc/wbar
43 cp -a $install/usr $fs
44 ln -s /etc/wbar/dot.wbar $fs/usr/share/wbar/dot.wbar
45 touch $fs/etc/wbar/dot.wbar
46 }
48 # Post install/remove commands for Tazpkg.
49 post_install()
50 {
51 rm -f "$1/etc/dot.wbar"
52 [ -s "$1/etc/wbar/dot.wbar" ] || rm -f "$1/etc/wbar/dot.wbar"
53 mv "$1/etc/wbar/dot.wbar" "$1/etc/wbar/dot.wbar.old" 2> /dev/null && cat <<EOT
54 --------
55 Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
56 --------
57 EOT
58 cat > "$1/etc/wbar/dot.wbar" << EOT
59 # The Bar && Font
60 i: /usr/share/wbar/iconpack/osxbarback.png
61 t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
62 c:
64 EOT
65 while read icon exe text; do
66 [ -x $exe ] || continue
67 cat >> "$1/etc/wbar/dot.wbar" << EOT
68 i: $icon
69 c: $exe
70 t: $text
72 EOT
73 done << EOT
74 /usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
75 /usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
76 /usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
77 /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
78 /usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
79 /usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
80 EOT
81 grep -q 'wbar' "$1/etc/xdg/openbox/autostart.sh" ||
82 cat >> "$1/etc/xdg/openbox/autostart.sh" << EOT
84 # Wbar icons panel.
85 (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
86 EOT
87 }
89 post_remove()
90 {
91 sed -i '/Wbar/ d' "$1/etc/xdg/openbox/autostart.sh"
92 sed -i '/wbar/ d' "$1/etc/xdg/openbox/autostart.sh"
93 }