wok-next view slim/receipt @ rev 2277
mirror-tools: fix chroot path for mkpkgiso
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 19 10:15:15 2009 +0000 (2009-02-19) |
parents | bd6010223726 |
children | c61177674d4d |
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 slitaz-configs"
9 BUILD_DEPENDS="xorg-dev jpeg-dev libpng-dev xorg-libXft-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://slim.berlios.de"
12 WGET_URL="http://download.berlios.de/slim/$TARBALL"
13 CONFIG_FILES="/etc/slim.conf"
14 BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)."
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" Makefile
21 sed -i "s|/usr/X11R6/|/usr/|g" Makefile
22 make
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/bin $fs/usr/share/slim
29 cp -a $src/slim $fs/usr/bin
31 # Config file and rc script (theme is in slitaz-configs).
32 cp -a stuff/etc $fs
33 chown -R root.root $fs
34 }
36 pre_instal()
37 {
38 local root
39 root=$1
40 # Backup config file.
41 if [ -f $root/etc/slim.conf ]; then
42 cp $root/etc/slim.conf $root/etc/slim.conf.bak
43 fi
44 }
46 post_install()
47 {
48 local root
49 root=$1
50 # Restore original config.
51 if [ -f $root/etc/slim.conf.bak ]; then
52 mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
53 fi
54 local USER
55 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
56 [ -n "$USER" ] &&
57 sed -i s/"default_user .*"/"default_user $USER"/ $1/etc/slim.conf
58 }