wok view slim-pam/receipt @ rev 4774

Up: get-virtualbox (1.01) - Improve vbox installer for slitaz.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Jan 13 00:39:30 2010 +0100 (2010-01-13)
parents 0088f0af4413
children 09d47b216378
line source
1 # SliTaz package receipt.
3 PACKAGE="slim-pam"
4 VERSION="1.3.1"
5 CATEGORY="x-window"
6 SHORT_DESC="Desktop-independent graphical login manager for X11."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="xorg jpeg libpng slitaz-configs pam"
9 BUILD_DEPENDS="xorg-dev jpeg-dev libpng-dev xorg-libXft-dev pam pam-dev"
10 SOURCE="slim"
11 TARBALL="$SOURCE-$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 PROVIDE="slim:pam"
16 BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)."
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 patch -p0 < ../../slim/stuff/gcc44.patch || exit 1
23 sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" Makefile
24 sed -i "s|/usr/X11R6/|/usr/|g" Makefile
25 make USE_PAM=1
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr/bin $fs/usr/share/slim
32 cp -a $src/slim $fs/usr/bin
34 # Config file and rc script (theme is in slitaz-configs).
35 cp -a ../$SOURCE/stuff/etc $fs
36 chown -R root.root $fs
37 }
39 pre_instal()
40 {
41 local root
42 root=$1
43 # Backup config file.
44 if [ -f $root/etc/slim.conf ]; then
45 cp $root/etc/slim.conf $root/etc/slim.conf.bak
46 fi
47 }
49 post_install()
50 {
51 local root
52 root=$1
53 # Restore original config.
54 if [ -f $root/etc/slim.conf.bak ]; then
55 mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
56 fi
57 local USER
58 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
59 [ -n "$USER" ] &&
60 sed -i s/"default_user .*"/"default_user $USER"/ $1/etc/slim.conf
61 }