wok diff slim/receipt @ rev 15693

linux-lxc: modify post_install() for update /etc/fstab
author Stanislas Leduc <shann@slitaz.org>
date Sat Dec 21 08:40:56 2013 +0100 (2013-12-21)
parents 77143f213b9b
children 1a0b3262dccf
line diff
     1.1 --- a/slim/receipt	Thu Sep 13 21:59:17 2012 +0200
     1.2 +++ b/slim/receipt	Sat Dec 21 08:40:56 2013 +0100
     1.3 @@ -1,61 +1,62 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="slim"
     1.7 -VERSION="1.3.3" # 1.3.4
     1.8 +VERSION="1.3.5"
     1.9  CATEGORY="x-window"
    1.10  SHORT_DESC="Desktop-independent graphical login manager for X11."
    1.11  MAINTAINER="pankso@slitaz.org"
    1.12 -SUGGESTED="slim-theme-default slitaz-configs"
    1.13 +LICENSE="GPL2"
    1.14 +WEB_SITE="http://slim.berlios.de/"
    1.15  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.16 -WEB_SITE="http://slim.berlios.de"
    1.17  WGET_URL="http://download.berlios.de/slim/$TARBALL"
    1.18  CONFIG_FILES="/etc/slim.conf"
    1.19  
    1.20 -DEPENDS="glibc-base gcc-lib-base expat fontconfig freetype util-linux-uuid \
    1.21 -zlib jpeg libpng xorg-libXft xorg-libXmu"
    1.22 -BUILD_DEPENDS="xorg-libXft-dev xorg-libXmu-dev jpeg-dev libpng-dev cmake"
    1.23 +DEPENDS="gcc-lib-base libjpeg libpng xorg-libXft xorg-libXmu"
    1.24 +SUGGESTED="slim-theme-default slitaz-configs"
    1.25 +BUILD_DEPENDS="cmake freetype-dev jpeg-dev libpng-dev xorg-libXft-dev \
    1.26 +xorg-libXmu-dev"
    1.27 +RELATED="slim-pam slim-theme-default" # don't forget to upgrade them too
    1.28  
    1.29  # Rules to configure and make the package.
    1.30  compile_rules()
    1.31  {
    1.32 -	cd $src
    1.33 -	#patch -p1 < $stuff/NoPwdForCmd.patch || return 1
    1.34 -	cmake -DCMAKE_INSTALL_PREFIX=/usr . &&
    1.35 -	make && make DESTDIR=$DESTDIR install
    1.36 +	patch -p1 < $stuff/$PACKAGE-$VERSION.patch || return 1
    1.37 +	mkdir build; cd build
    1.38 +	cmake \
    1.39 +		-DCMAKE_INSTALL_PREFIX=/usr \
    1.40 +		-DX11_Xmu_LIB=-lXmu \
    1.41 +		.. &&
    1.42 +	make &&
    1.43 +	make DESTDIR=$DESTDIR install
    1.44  }
    1.45  
    1.46  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.47  genpkg_rules()
    1.48  {
    1.49  	mkdir -p $fs/usr/share/slim
    1.50 +	cp -a $install/etc $fs
    1.51 +	cp -a $install/usr/bin $fs/usr
    1.52  	cp -a $stuff/themes $fs/usr/share/slim
    1.53 -	cp -a $install/usr/bin $fs/usr
    1.54  
    1.55  	# Config file and rc script.
    1.56  	cp -a $stuff/etc $fs
    1.57  	chown -R root.root $fs
    1.58 -}
    1.59  
    1.60 -pre_install()
    1.61 -{
    1.62 -	local root
    1.63 -	root=$1
    1.64 -	# Backup config file.
    1.65 -	if [ -f $root/etc/slim.conf ]; then
    1.66 -		cp $root/etc/slim.conf $root/etc/slim.conf.bak
    1.67 -	fi
    1.68 +	# slim-theme manager
    1.69 +	install -m755 $stuff/slim-theme $fs/usr/bin/slim-theme
    1.70  }
    1.71  
    1.72  post_install()
    1.73  {
    1.74 -	local root
    1.75 -	root=$1
    1.76 -	# Restore original config.
    1.77 -	if [ -f $root/etc/slim.conf.bak ]; then
    1.78 -		mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
    1.79 -	fi
    1.80  	local USER
    1.81  	USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
    1.82  	[ -n "$USER" ] &&
    1.83  	sed -i s/"default_user .*"/"default_user        $USER"/ $1/etc/slim.conf
    1.84 +
    1.85 +	# In order to update the SLiM, we need to restart it.
    1.86 +	# We can't just "/etc/init.d/slim restart" because it momentarily interrupts
    1.87 +	# X session and the user will get a terrible console with strange letters.
    1.88 +	printf '%40s\n' | tr ' ' '='
    1.89 +	echo "In order to update the SLiM,"
    1.90 +	echo "please, reboot your system!"
    1.91  }