wok annotate slim/receipt @ rev 13307
Move from undigest help2man
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Aug 29 10:51:33 2012 +0200 (2012-08-29) |
parents | ed2198370ffb |
children | 77143f213b9b |
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@2838 | 8 SUGGESTED="slim-theme-default slitaz-configs" |
pankso@263 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@263 | 10 WEB_SITE="http://slim.berlios.de" |
pankso@263 | 11 WGET_URL="http://download.berlios.de/slim/$TARBALL" |
pascal@1212 | 12 CONFIG_FILES="/etc/slim.conf" |
pankso@263 | 13 |
pankso@12481 | 14 DEPENDS="glibc-base gcc-lib-base expat fontconfig freetype util-linux-uuid \ |
pankso@9737 | 15 zlib jpeg libpng xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp \ |
pankso@9737 | 16 xorg-libXext xorg-libXft xorg-libXmu xorg-libXrender xorg-libXt" |
pankso@12310 | 17 BUILD_DEPENDS="xorg-dev jpeg-dev libpng-dev" |
pankso@9737 | 18 |
pankso@263 | 19 # Rules to configure and make the package. |
pankso@263 | 20 compile_rules() |
pankso@263 | 21 { |
pankso@263 | 22 cd $src |
pascal@8974 | 23 patch -p1 < $stuff/NoPwdForCmd.patch || return 1 |
pankso@9737 | 24 make && make DESTDIR=$WOK/$PACKAGE/install 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 } |