wok-current view slim-pam/receipt @ rev 5792
Up nss_ldap (265)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 11 11:12:20 2010 +0200 (2010-07-11) |
parents | 996a788dda09 |
children | a0fa6235faca |
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 zlib-dev freetype-dev fontconfig-dev"
11 SOURCE="slim"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WEB_SITE="http://slim.berlios.de"
14 WGET_URL="http://download.berlios.de/slim/$TARBALL"
15 CONFIG_FILES="/etc/slim.conf"
16 PROVIDE="slim:pam"
17 BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)."
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 cd $src
23 patch -p0 < ../../slim/stuff/gcc44.patch || exit 1
24 sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" Makefile
25 sed -i "s|/usr/X11R6/|/usr/|g" Makefile
26 make USE_PAM=1
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/usr/bin $fs/usr/share/slim
33 cp -a $src/slim $fs/usr/bin
35 # Config file and rc script (theme is in slitaz-configs).
36 cp -a ../$SOURCE/stuff/etc $fs
37 chown -R root.root $fs
38 }
40 pre_instal()
41 {
42 local root
43 root=$1
44 # Backup config file.
45 if [ -f $root/etc/slim.conf ]; then
46 cp $root/etc/slim.conf $root/etc/slim.conf.bak
47 fi
48 }
50 post_install()
51 {
52 local root
53 root=$1
54 # Restore original config.
55 if [ -f $root/etc/slim.conf.bak ]; then
56 mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
57 fi
58 local USER
59 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
60 [ -n "$USER" ] &&
61 sed -i s/"default_user .*"/"default_user $USER"/ $1/etc/slim.conf
62 }