wok annotate slim/receipt @ rev 9709

gcc: keep -mtune it was $BUILD_HOST to remove
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 08 20:54:33 2011 +0200 (2011-05-08)
parents 940b5937e496
children a0a049fe8e5c
rev   line source
pankso@263 1 # SliTaz package receipt.
pankso@263 2
pankso@263 3 PACKAGE="slim"
rcx@6055 4 VERSION="1.3.2"
pankso@263 5 CATEGORY="x-window"
pankso@263 6 SHORT_DESC="Desktop-independent graphical login manager for X11."
pankso@263 7 MAINTAINER="pankso@slitaz.org"
pankso@4052 8 DEPENDS="glibc-base gcc-lib-base expat fontconfig freetype util-linux-ng-uuid zlib \
rcx@3726 9 jpeg libpng xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp \
rcx@3726 10 xorg-libXext xorg-libXft xorg-libXmu xorg-libXrender xorg-libXt"
pankso@2838 11 SUGGESTED="slim-theme-default slitaz-configs"
pankso@263 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@263 13 WEB_SITE="http://slim.berlios.de"
pankso@263 14 WGET_URL="http://download.berlios.de/slim/$TARBALL"
pascal@1212 15 CONFIG_FILES="/etc/slim.conf"
pascal@1778 16 BUGS="Sometime needs more than 10 seconds to start (since HAL/DCOP addition)."
pankso@263 17
pankso@263 18 # Rules to configure and make the package.
pankso@263 19 compile_rules()
pankso@263 20 {
pankso@263 21 cd $src
pascal@8974 22 patch -p1 < $stuff/NoPwdForCmd.patch || return 1
rcx@6055 23 make &&
slaxemulator@9688 24 make install
pankso@263 25 }
pankso@263 26
pankso@263 27 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@263 28 genpkg_rules()
pankso@263 29 {
rcx@6055 30 mkdir -p $fs/usr/share/slim
pascal@8974 31 cp -a $stuff/themes $fs/usr/share/slim
rcx@6055 32 cp -a $_pkg/usr/bin $fs/usr
rcx@6055 33
pankso@2838 34 # Config file and rc script.
pascal@8974 35 cp -a $stuff/etc $fs
pankso@1090 36 chown -R root.root $fs
pankso@263 37 }
pankso@263 38
pankso@3000 39 pre_install()
pankso@2053 40 {
pankso@2053 41 local root
pankso@2053 42 root=$1
pankso@2053 43 # Backup config file.
pankso@2053 44 if [ -f $root/etc/slim.conf ]; then
pankso@2053 45 cp $root/etc/slim.conf $root/etc/slim.conf.bak
pankso@2053 46 fi
pankso@2053 47 }
pankso@2053 48
pascal@1062 49 post_install()
pascal@1062 50 {
pankso@2053 51 local root
pankso@2053 52 root=$1
pankso@2053 53 # Restore original config.
pankso@2053 54 if [ -f $root/etc/slim.conf.bak ]; then
pankso@2053 55 mv -f $root/etc/slim.conf.bak $root/etc/slim.conf
pankso@2053 56 fi
pascal@1784 57 local USER
pascal@1784 58 USER=$(awk -F: '/:1000:1000:/ { print $1 }' < $1/etc/passwd)
pascal@1784 59 [ -n "$USER" ] &&
pascal@1784 60 sed -i s/"default_user .*"/"default_user $USER"/ $1/etc/slim.conf
pascal@1062 61 }