wok-stable diff slim-pam/receipt @ rev 3272

leafpad: Add chinese name and comment to leafpad.desktop
author Chen Yufei <tsjz@ymail.com>
date Tue Jun 02 12:41:43 2009 +0800 (2009-06-02)
parents
children 996a788dda09
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/slim-pam/receipt	Tue Jun 02 12:41:43 2009 +0800
     1.3 @@ -0,0 +1,60 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="slim-pam"
     1.7 +VERSION="1.3.1"
     1.8 +CATEGORY="x-window"
     1.9 +SHORT_DESC="Desktop-independent graphical login manager for X11."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +DEPENDS="xorg jpeg libpng slitaz-configs pam"
    1.12 +BUILD_DEPENDS="xorg-dev jpeg-dev libpng-dev xorg-libXft-dev pam pam-dev"
    1.13 +SOURCE="slim"
    1.14 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.15 +WEB_SITE="http://slim.berlios.de"
    1.16 +WGET_URL="http://download.berlios.de/slim/$TARBALL"
    1.17 +CONFIG_FILES="/etc/slim.conf"
    1.18 +PROVIDE="slim:pam"
    1.19 +BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)."
    1.20 +
    1.21 +# Rules to configure and make the package.
    1.22 +compile_rules()
    1.23 +{
    1.24 +	cd $src
    1.25 +	sed -i "s|/usr/X11R6/include|/usr/include/xorg|g" Makefile
    1.26 +	sed -i "s|/usr/X11R6/|/usr/|g" Makefile
    1.27 +	make USE_PAM=1
    1.28 +}
    1.29 +
    1.30 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.31 +genpkg_rules()
    1.32 +{
    1.33 +	mkdir -p $fs/usr/bin $fs/usr/share/slim
    1.34 +	cp -a $src/slim $fs/usr/bin
    1.35 +	
    1.36 +	# Config file and rc script (theme is in slitaz-configs).
    1.37 +	cp -a ../$SOURCE/stuff/etc $fs
    1.38 +	chown -R root.root $fs
    1.39 +}
    1.40 +
    1.41 +pre_instal()
    1.42 +{
    1.43 +	local root
    1.44 +	root=$1
    1.45 +	# Backup config file.
    1.46 +	if [ -f $root/etc/slim.conf ]; then
    1.47 +		cp $root/etc/slim.conf $root/etc/slim.conf.bak
    1.48 +	fi
    1.49 +}
    1.50 +
    1.51 +post_install()
    1.52 +{
    1.53 +	local root
    1.54 +	root=$1
    1.55 +	# Restore original config.
    1.56 +	if [ -f $root/etc/slim.conf.bak ]; then
    1.57 +		mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
    1.58 +	fi
    1.59 +	local USER
    1.60 +	USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
    1.61 +	[ -n "$USER" ] &&
    1.62 +	sed -i s/"default_user .*"/"default_user        $USER"/ $1/etc/slim.conf
    1.63 +}