wok-6.x view slim/receipt @ rev 3293

Jinja2: fix genpkg_rules
author Claudinei Pereira <claudinei@slitaz.org>
date Thu Jun 04 00:40:12 2009 +0000 (2009-06-04)
parents 348ab55e5d94
children a067e6194436
line source
1 # SliTaz package receipt.
3 PACKAGE="slim"
4 VERSION="1.3.1"
5 CATEGORY="x-window"
6 SHORT_DESC="Desktop-independent graphical login manager for X11."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="xorg jpeg libpng"
9 BUILD_DEPENDS="xorg-dev jpeg-dev libpng-dev xorg-libXft-dev"
10 SUGGESTED="slim-theme-default slitaz-configs"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WEB_SITE="http://slim.berlios.de"
13 WGET_URL="http://download.berlios.de/slim/$TARBALL"
14 CONFIG_FILES="/etc/slim.conf"
15 BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)."
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" Makefile
22 sed -i "s|/usr/X11R6/|/usr/|g" Makefile
23 make
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/usr/bin $fs/usr/share/slim
30 cp -a $src/slim $fs/usr/bin
31 cp -a stuff/themes $fs/usr/share/slim
32 # Config file and rc script.
33 cp -a stuff/etc $fs
34 chown -R root.root $fs
35 }
37 pre_install()
38 {
39 local root
40 root=$1
41 # Backup config file.
42 if [ -f $root/etc/slim.conf ]; then
43 cp $root/etc/slim.conf $root/etc/slim.conf.bak
44 fi
45 }
47 post_install()
48 {
49 local root
50 root=$1
51 # Restore original config.
52 if [ -f $root/etc/slim.conf.bak ]; then
53 mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
54 fi
55 local USER
56 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
57 [ -n "$USER" ] &&
58 sed -i s/"default_user .*"/"default_user $USER"/ $1/etc/slim.conf
59 }