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