wok-current annotate karmen/receipt @ rev 18730

Quote root dir in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 20 15:13:45 2015 +0100 (2015-12-20)
parents 5d53e8ccbc8d
children ba7cbdb5749c
rev   line source
pankso@2894 1 # SliTaz package receipt.
pankso@2894 2
pankso@2894 3 PACKAGE="karmen"
pankso@2894 4 VERSION="0.15"
pankso@2894 5 CATEGORY="x-window"
pankso@2894 6 SHORT_DESC="Very light and minimalistic window manager for X."
pankso@2894 7 MAINTAINER="pankso@slitaz.org"
pascal@15601 8 LICENSE="MIT"
pankso@2894 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@2894 10 WEB_SITE="http://karmen.sourceforge.net/"
pankso@2894 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
al@17501 12 TAGS="window-manager"
pankso@12408 13
pankso@12408 14 DEPENDS="xorg-libX11 xorg-xsetroot nano xterm xorg-xclock dialog"
pankso@2894 15 BUILD_DEPENDS="xorg-libX11-dev"
pankso@2894 16
pankso@2894 17 # Rules to configure and make the package.
pankso@2894 18 compile_rules()
pankso@2894 19 {
pankso@2894 20 cd $src
pankso@12408 21 ./configure --prefix=/usr \
pankso@12408 22 $CONFIGURE_ARGS &&
pankso@12408 23 make && make install
pankso@2894 24 }
pankso@2894 25
pankso@2894 26 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@2894 27 genpkg_rules()
pankso@2894 28 {
pankso@12408 29 mkdir -p $fs/usr/share
pascal@15601 30 cp -a $install/usr/bin $fs/usr
pankso@2894 31 # Custom configuration and scripts.
pankso@12408 32 install -m 0755 $stuff/karmen-session $fs/usr/bin
pankso@12408 33 install -m 0755 $stuff/karmen-conf $fs/usr/bin
pankso@12408 34 cp -a $stuff/xsessions $fs/usr/share
pankso@12408 35 cp -a $stuff/etc $fs
pankso@2894 36 chown 0.0 $fs/usr/bin/*
pankso@2894 37 }
pankso@2894 38
pankso@2894 39 post_install()
pankso@2894 40 {
pascal@18730 41 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
pankso@2894 42 # Adding WM to SLIM available sessions.
pankso@2894 43 if ! echo "$res" | grep -q $PACKAGE; then
pankso@2894 44 echo -n "Adding $PACKAGE to /etc/slim.conf..."
pascal@18730 45 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
pankso@2894 46 status
pankso@2894 47 fi
pankso@2894 48 }
pankso@2894 49
pankso@2894 50 post_remove()
pankso@2894 51 {
pankso@2894 52 # Remove WM from SLIM available sessions.
pascal@18730 53 if grep -q $PACKAGE "$1/etc/slim.conf"; then
pascal@18730 54 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
pankso@2894 55 fi
pankso@2894 56 }