wok-next diff wbar/receipt @ rev 20503

Packing...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 16 06:03:21 2018 +0200 (2018-03-16)
parents 9e01bc6321ea
children d6378d455338
line diff
     1.1 --- a/wbar/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.2 +++ b/wbar/receipt	Fri Mar 16 06:03:21 2018 +0200
     1.3 @@ -1,83 +1,84 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="wbar"
     1.8  VERSION="1.3.3"
     1.9  CATEGORY="system-tools"
    1.10 -SHORT_DESC="Quick launch bar."
    1.11 +SHORT_DESC="Quick launch bar"
    1.12  MAINTAINER="pascal.bellard@slitaz.org"
    1.13  LICENSE="GPL"
    1.14 +WEB_SITE="http://code.google.com/p/wbar/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION.tbz2"
    1.17 -WEB_SITE="http://code.google.com/p/wbar/"
    1.18  WGET_URL="http://www.tecapli.com.ar/warlock/$TARBALL"
    1.19 -CONFIG_FILES="/etc/wbar/dot.wbar"
    1.20 -TAGS="desktop launchbar"
    1.21  
    1.22 -DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
    1.23 -BUILD_DEPENDS="imlib2-dev"
    1.24 +BUILD_DEPENDS="imlib2-dev xorg-libX11-dev"
    1.25  
    1.26 -# Rules to configure and make the package.
    1.27 -compile_rules()
    1.28 -{
    1.29 +compile_rules() {
    1.30  	patch -p0 < $stuff/gcc43_fixes.diff || return 1
    1.31  	sed -i 's|^LDFLAGS.*|& -lX11|' Makefile
    1.32 -	make &&
    1.33 -	mkdir -p $DESTDIR/usr/share/wbar/iconpack $DESTDIR/usr/bin &&
    1.34 -	cp wbar $DESTDIR/usr/bin &&
    1.35 -	cp iconpack/wbar.osx/osxbarback.png $DESTDIR/usr/share/wbar/iconpack
    1.36 +	make || return 1
    1.37 +
    1.38 +	mkdir -p \
    1.39 +		$install/usr/share/wbar/iconpack/ \
    1.40 +		$install/usr/bin/ \
    1.41 +		$install/etc/wbar/
    1.42 +	cp wbar $install/usr/bin/
    1.43 +	cp iconpack/wbar.osx/osxbarback.png $install/usr/share/wbar/iconpack/
    1.44 +	ln -s         /etc/wbar/dot.wbar    $install/usr/share/wbar/dot.wbar
    1.45 +	touch $install/etc/wbar/dot.wbar
    1.46  }
    1.47  
    1.48 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.49 -genpkg_rules()
    1.50 -{
    1.51 -	mkdir -p $fs/etc/wbar
    1.52 -	cp -a $install/usr $fs
    1.53 -	ln -s /etc/wbar/dot.wbar $fs/usr/share/wbar/dot.wbar
    1.54 -	touch $fs/etc/wbar/dot.wbar
    1.55 +genpkg_rules() {
    1.56 +	copy @std
    1.57 +	DEPENDS="imlib2 ttf-dejavu gcc-lib-base"
    1.58 +	CONFIG_FILES="/etc/wbar/dot.wbar"
    1.59 +	TAGS="desktop launchbar"
    1.60  }
    1.61  
    1.62 -# Post install/remove commands for Tazpkg.
    1.63 -post_install()
    1.64 -{
    1.65 +post_install() {
    1.66  	rm -f "$1/etc/dot.wbar"
    1.67  	[ -s "$1/etc/wbar/dot.wbar" ] || rm -f "$1/etc/wbar/dot.wbar"
    1.68 -	mv "$1/etc/wbar/dot.wbar" "$1/etc/wbar/dot.wbar.old" 2> /dev/null && cat <<EOT
    1.69 +
    1.70 +	mv "$1/etc/wbar/dot.wbar" "$1/etc/wbar/dot.wbar.old" 2>/dev/null &&
    1.71 +	cat <<EOT
    1.72  --------
    1.73  Your old wbar configuration is saved into /etc/wbar/dot.wbar.old
    1.74  --------
    1.75  EOT
    1.76 -	cat > "$1/etc/wbar/dot.wbar" << EOT
    1.77 +
    1.78 +	cat > "$1/etc/wbar/dot.wbar" <<EOT
    1.79  # The Bar && Font
    1.80  i: /usr/share/wbar/iconpack/osxbarback.png
    1.81  t: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans/12
    1.82  c:
    1.83  
    1.84  EOT
    1.85 +
    1.86  	while read icon exe text; do
    1.87  		[ -x $exe ] || continue
    1.88 -		cat >> "$1/etc/wbar/dot.wbar" << EOT
    1.89 +		cat >> "$1/etc/wbar/dot.wbar" <<EOT
    1.90  i: $icon
    1.91  c: $exe
    1.92  t: $text
    1.93  
    1.94  EOT
    1.95 -	done << EOT
    1.96 -/usr/share/pixmaps/firefox.png /usr/bin/firefox firefox
    1.97 -/usr/share/pixmaps/pidgin.png /usr/bin/pidgin pidgin
    1.98 -/usr/share/pixmaps/gimp.png /usr/bin/gimp gimp
    1.99 +	done <<EOT
   1.100 +/usr/share/pixmaps/firefox.png    /usr/bin/firefox    firefox
   1.101 +/usr/share/pixmaps/pidgin.png     /usr/bin/pidgin     pidgin
   1.102 +/usr/share/pixmaps/gimp.png       /usr/bin/gimp       gimp
   1.103  /usr/share/pixmaps/alsaplayer.png /usr/bin/alsaplayer alsaplayer
   1.104 -/usr/share/pixmaps/xterm.png /usr/bin/xterm xterm
   1.105 -/usr/share/pixmaps/leafpad.png /usr/bin/leafpad leafpad
   1.106 +/usr/share/pixmaps/xterm.png      /usr/bin/xterm      xterm
   1.107 +/usr/share/pixmaps/leafpad.png    /usr/bin/leafpad    leafpad
   1.108  EOT
   1.109 +
   1.110  	grep -q 'wbar' "$1/etc/xdg/openbox/autostart.sh" ||
   1.111 -	cat >> "$1/etc/xdg/openbox/autostart.sh" << EOT
   1.112 +	cat >> "$1/etc/xdg/openbox/autostart.sh" <<EOT
   1.113  
   1.114  # Wbar icons panel.
   1.115  (sleep 2 && wbar -above-desk -pos top center -jumpf 0 -zoomf 1.5 -bpress -balfa 0) &
   1.116  EOT
   1.117  }
   1.118  
   1.119 -post_remove()
   1.120 -{
   1.121 -	sed -i '/Wbar/ d' "$1/etc/xdg/openbox/autostart.sh"
   1.122 -	sed -i '/wbar/ d' "$1/etc/xdg/openbox/autostart.sh"
   1.123 +post_remove() {
   1.124 +	sed -i '/Wbar/d; /wbar/d' "$1/etc/xdg/openbox/autostart.sh"
   1.125  }