wok-next annotate pekwm/receipt @ rev 2878

pekwm: Fix and improve receipt + add custom config
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 04 14:07:08 2009 +0200 (2009-05-04)
parents 2a44d519abca
children 95a7fe095e66
rev   line source
jozee@2875 1 # SliTaz package receipt.
jozee@2875 2
jozee@2875 3 PACKAGE="pekwm"
jozee@2875 4 VERSION="0.1.10"
jozee@2875 5 CATEGORY="x-window"
pankso@2878 6 SHORT_DESC="Very light, configurable and themable window manager for X."
jozee@2875 7 MAINTAINER="jozee@slitaz.org"
jozee@2875 8 DEPENDS="xorg-libX11 xorg-libXinerama xorg-libXft xorg-libXrandr xorg-libXpm"
jozee@2875 9 BUILD_DEPENDS="xorg-dev xorg-dev-proto zlib-dev"
pankso@2878 10 SUGGESTED="hsetroot tint2 lxpanel wbar"
jozee@2875 11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
jozee@2875 12 WEB_SITE="http://www.pekwm.org/projects/3/files"
jozee@2875 13 WGET_URL="$WEB_SITE/$TARBALL"
jozee@2875 14
jozee@2875 15 # Rules to configure and make the package.
jozee@2875 16 compile_rules()
jozee@2875 17 {
jozee@2875 18 cd $src
pankso@2878 19 ./configure --prefix=/usr --sysconfdir=/etc $CONFIGURE_ARGS &&
pankso@2878 20 make &&
jozee@2875 21 make DESTDIR=$PWD/_pkg install
jozee@2875 22 }
jozee@2875 23
jozee@2875 24 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@2875 25 genpkg_rules()
jozee@2875 26 {
jozee@2875 27 mkdir -p $fs/usr/bin
jozee@2875 28 mkdir -p $fs/usr/share
jozee@2875 29 mkdir -p $fs/etc
jozee@2875 30 cp -a $_pkg/usr/bin $fs/usr
jozee@2875 31 cp -a $_pkg/usr/share/pekwm $fs/usr/share
jozee@2875 32 cp -a $_pkg/etc $fs
pankso@2878 33 # Custom configuration files
pankso@2878 34 cp -a stuff/etc $fs
pankso@2878 35 echo '$TERM="xterm"' > $fs/etc/pekwm/vars
jozee@2875 36 # Set perms.
jozee@2875 37 chown -R root.root $fs
pankso@2878 38 chmod +x $fs/etc/pekwm/start
pankso@2878 39 chmod +x $fs/usr/share/pekwm/scripts/*
jozee@2875 40 chmod 0755 $fs/usr/bin/pekwm
jozee@2875 41 }
jozee@2875 42
jozee@2875 43 post_install()
jozee@2875 44 {
pankso@2878 45 # Pekwm searches for default font path (100dpi folder) for xsever to render
pankso@2878 46 # menus; either manually set it in .xinitrc or fake 100dpi folder fonts
pankso@2878 47 # by linking to ttf-dejavu
pankso@2878 48 if [ ! -d $1/usr/share/fonts/X11/100dpi/ ]; then
pankso@2878 49 mkdir -p $1/usr/share/fonts/X11/100dpi
pankso@2878 50 cd $1/usr/share/fonts/X11/100dpi
pankso@2878 51 ln -s ../../truetype/ttf-dejavu/* .
pankso@2878 52 fi
jozee@2875 53
jozee@2875 54 res=`cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//`
jozee@2875 55 # Adding WM to SLIM available sessions.
jozee@2875 56 if ! echo "$res" | grep -q $PACKAGE; then
jozee@2875 57 echo -n "Adding $PACKAGE to /etc/slim.conf..."
pankso@2878 58 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" /etc/slim.conf
jozee@2875 59 status
jozee@2875 60 fi
jozee@2875 61 }
jozee@2875 62
jozee@2875 63 post_remove()
jozee@2875 64 {
pankso@2878 65 # Remove WM from SLIM available sessions.
pankso@2878 66 if grep -q $PACKAGE $1/etc/slim.conf; then
pankso@2878 67 sed -i s/,$PACKAGE// $1/etc/slim.conf
jozee@2875 68 fi
jozee@2875 69 }