wok-next annotate wbar/receipt @ rev 21594

updated dnsmasq (2.68 -> 2.81)
author Hans-G?nter Theisgen
date Wed Jun 24 07:44:07 2020 +0100 (2020-06-24)
parents 8e1b2a143eb3
children
rev   line source
al@20503 1 # SliTaz package receipt v2.
pascal@2819 2
pascal@2819 3 PACKAGE="wbar"
pascal@2819 4 VERSION="1.3.3"
pascal@2819 5 CATEGORY="system-tools"
al@20503 6 SHORT_DESC="Quick launch bar"
pascal@2819 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15363 8 LICENSE="GPL"
al@20949 9 WEB_SITE="https://github.com/rodolf0/wbar"
al@20503 10
pascal@2819 11 TARBALL="$PACKAGE-$VERSION.tbz2"
pascal@2819 12 WGET_URL="http://www.tecapli.com.ar/warlock/$TARBALL"
erjo@9956 13
al@21078 14 BUILD_DEPENDS="imlib2-dev libx11-dev"
pascal@2819 15
al@20503 16 compile_rules() {
pascal@17759 17 sed -i 's|^LDFLAGS.*|& -lX11|' Makefile
al@20503 18 make || return 1
al@20503 19
al@20503 20 mkdir -p \
al@20503 21 $install/usr/share/wbar/iconpack/ \
al@20503 22 $install/usr/bin/ \
al@20503 23 $install/etc/wbar/
al@20503 24 cp wbar $install/usr/bin/
al@20503 25 cp iconpack/wbar.osx/osxbarback.png $install/usr/share/wbar/iconpack/
al@20503 26 ln -s /etc/wbar/dot.wbar $install/usr/share/wbar/dot.wbar
al@20503 27 touch $install/etc/wbar/dot.wbar
pascal@2819 28 }
pascal@2819 29
al@20503 30 genpkg_rules() {
al@20503 31 copy @std
al@20503 32 DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
al@20503 33 CONFIG_FILES="/etc/wbar/dot.wbar"
al@20503 34 TAGS="desktop launchbar"
pascal@2819 35 }
pascal@2819 36
al@20503 37 post_install() {
pascal@18730 38 rm -f "$1/etc/dot.wbar"
pascal@18730 39 [ -s "$1/etc/wbar/dot.wbar" ] || rm -f "$1/etc/wbar/dot.wbar"
al@20503 40
al@20503 41 mv "$1/etc/wbar/dot.wbar" "$1/etc/wbar/dot.wbar.old" 2>/dev/null &&
al@20503 42 cat <<EOT
pascal@2819 43 --------
pankso@3094 44 Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
pascal@2819 45 --------
pascal@2819 46 EOT
al@20503 47
al@20503 48 cat > "$1/etc/wbar/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
al@20503 55
pascal@2819 56 while read icon exe text; do
pascal@2819 57 [ -x $exe ] || continue
al@20503 58 cat >> "$1/etc/wbar/dot.wbar" <<EOT
pascal@2819 59 i: $icon
pascal@2819 60 c: $exe
pascal@2819 61 t: $text
pascal@2819 62
pascal@2819 63 EOT
al@20503 64 done <<EOT
al@20503 65 /usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
al@20503 66 /usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
al@20503 67 /usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
pankso@3094 68 /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
al@20503 69 /usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
al@20503 70 /usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
pascal@2819 71 EOT
al@20503 72
pascal@18730 73 grep -q 'wbar' "$1/etc/xdg/openbox/autostart.sh" ||
al@20503 74 cat >> "$1/etc/xdg/openbox/autostart.sh" <<EOT
pankso@3094 75
pankso@3094 76 # Wbar icons panel.
pankso@3094 77 (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
pankso@3094 78 EOT
pascal@2819 79 }
pankso@3094 80
al@20503 81 post_remove() {
al@20503 82 sed -i '/Wbar/d; /wbar/d' "$1/etc/xdg/openbox/autostart.sh"
pankso@3094 83 }