wok-next diff dwm/receipt @ rev 20533

cairo-clock, grub4dos: fix CFLAGS
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 27 12:50:45 2018 +0200 (2018-03-27)
parents c4e53a39395a
children f99935f1778a
line diff
     1.1 --- a/dwm/receipt	Fri Mar 02 12:12:14 2018 +0200
     1.2 +++ b/dwm/receipt	Tue Mar 27 12:50:45 2018 +0200
     1.3 @@ -1,23 +1,20 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="dwm"
     1.8  VERSION="6.0"
     1.9  CATEGORY="x-window"
    1.10 -SHORT_DESC="Very light dynamic window manager for X."
    1.11 +SHORT_DESC="Very light dynamic window manager for X"
    1.12  MAINTAINER="pankso@slitaz.org"
    1.13  LICENSE="MIT"
    1.14 +WEB_SITE="http://dwm.suckless.org/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17 -WEB_SITE="http://dwm.suckless.org/"
    1.18  WGET_URL="http://dl.suckless.org/dwm/$TARBALL"
    1.19 -TAGS="window-manager"
    1.20  
    1.21 -DEPENDS="xorg-libX11 xorg-xsetroot"
    1.22  BUILD_DEPENDS="xorg-libX11-dev xorg-xproto xorg-xineramaproto \
    1.23  xorg-libXinerama-dev"
    1.24  
    1.25 -# Rules to configure and make the package.
    1.26 -compile_rules()
    1.27 -{
    1.28 +compile_rules() {
    1.29  	# From blue to grey and have lighter grey
    1.30  	sed -i s/'#0066ff'/'#222222'/g config.def.h
    1.31  	sed -i s/'#cccccc'/'#f1efeb'/g config.def.h
    1.32 @@ -27,32 +24,30 @@
    1.33  	sed -i s/'1 << 8,'/'0,     '/ config.def.h
    1.34  	# [Shift]+[Alt]+[Enter]
    1.35  	sed -i s/uxterm/xterm/ config.def.h
    1.36 -	make CC=${HOST_SYSTEM}-gcc
    1.37 +	make CC=$HOST_SYSTEM-gcc || return 1
    1.38 +
    1.39 +	install -Dm755 $src/dwm           $install/usr/bin/dwm
    1.40 +	install -Dm755 $stuff/dwm-session $install/usr/bin/dwm-session
    1.41  }
    1.42  
    1.43 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.44 -genpkg_rules()
    1.45 -{
    1.46 -	mkdir -p $fs/usr/bin
    1.47 -	cp -a $src/dwm $fs/usr/bin
    1.48 -	cp -a $stuff/dwm-session $fs/usr/bin
    1.49 -	chown 0.0 $fs/usr/bin/*
    1.50 +genpkg_rules() {
    1.51 +	copy @std
    1.52 +	DEPENDS="xorg-libX11 xorg-xsetroot"
    1.53 +	TAGS="window-manager"
    1.54  }
    1.55  
    1.56 -post_install()
    1.57 -{
    1.58 +# Adding WM to SLIM available sessions.
    1.59 +post_install() {
    1.60  	res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
    1.61 -	# Adding WM to SLIM available sessions.
    1.62  	if ! echo "$res" | grep -q $PACKAGE; then
    1.63 -		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.64 +		action "Adding $PACKAGE to /etc/slim.conf..."
    1.65  		sed -i "s/^sessions.*/sessions            ${res},dwm/" /etc/slim.conf
    1.66  		status
    1.67  	fi
    1.68  }
    1.69  
    1.70 -post_remove()
    1.71 -{
    1.72 -	# Remove karmen from SLIM available sessions.
    1.73 +# Remove dwm from SLIM available sessions.
    1.74 +post_remove() {
    1.75  	if grep -q dwm "$1/etc/slim.conf"; then
    1.76  		sed -i s/,dwm// "$1/etc/slim.conf"
    1.77  	fi