# HG changeset patch # User Pascal Bellard # Date 1234431972 0 # Node ID 0088f0af4413717ce1fee21603becba8d825bfd8 # Parent 893010cb28eaef1a3d721fe012882ba217514ab6 Add slim-pam diff -r 893010cb28ea -r 0088f0af4413 slim-pam/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/slim-pam/receipt Thu Feb 12 09:46:12 2009 +0000 @@ -0,0 +1,60 @@ +# SliTaz package receipt. + +PACKAGE="slim-pam" +VERSION="1.3.1" +CATEGORY="x-window" +SHORT_DESC="Desktop-independent graphical login manager for X11." +MAINTAINER="pascal.bellard@slitaz.org" +DEPENDS="xorg jpeg libpng slitaz-configs pam" +BUILD_DEPENDS="xorg-dev jpeg-dev libpng-dev xorg-libXft-dev pam pam-dev" +SOURCE="slim" +TARBALL="$SOURCE-$VERSION.tar.gz" +WEB_SITE="http://slim.berlios.de" +WGET_URL="http://download.berlios.de/slim/$TARBALL" +CONFIG_FILES="/etc/slim.conf" +PROVIDE="slim:pam" +BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)." + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" Makefile + sed -i "s|/usr/X11R6/|/usr/|g" Makefile + make USE_PAM=1 +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin $fs/usr/share/slim + cp -a $src/slim $fs/usr/bin + + # Config file and rc script (theme is in slitaz-configs). + cp -a ../$SOURCE/stuff/etc $fs + chown -R root.root $fs +} + +pre_instal() +{ + local root + root=$1 + # Backup config file. + if [ -f $root/etc/slim.conf ]; then + cp $root/etc/slim.conf $root/etc/slim.conf.bak + fi +} + +post_install() +{ + local root + root=$1 + # Restore original config. + if [ -f $root/etc/slim.conf.bak ]; then + mv -f $root/etc/slim.conf.bak $root/etc/slim.conf + fi + local USER + USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd) + [ -n "$USER" ] && + sed -i s/"default_user .*"/"default_user $USER"/ $1/etc/slim.conf +}