wok annotate karmen/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (24 months ago)
parents 9e01bc6321ea
children 7dd01dedad38
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
pascal@24412 17 # What is the latest version available today?
pascal@24412 18 current_version()
pascal@24412 19 {
pascal@24412 20 wget -O - https://sourceforge.net/projects/karmen/files/karmen/ 2>/dev/null | \
pascal@24412 21 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24412 22 sed '/scope="row/!d;s|.*/karmen/||;s|/.*||;q'
pascal@24412 23 }
pascal@24412 24
pankso@2894 25 # Rules to configure and make the package.
pankso@2894 26 compile_rules()
pankso@2894 27 {
pankso@2894 28 cd $src
pankso@12408 29 ./configure --prefix=/usr \
pankso@12408 30 $CONFIGURE_ARGS &&
pankso@12408 31 make && make install
pankso@2894 32 }
pankso@2894 33
pankso@2894 34 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@2894 35 genpkg_rules()
pankso@2894 36 {
pankso@12408 37 mkdir -p $fs/usr/share
pascal@15601 38 cp -a $install/usr/bin $fs/usr
pankso@2894 39 # Custom configuration and scripts.
pankso@12408 40 install -m 0755 $stuff/karmen-session $fs/usr/bin
pankso@12408 41 install -m 0755 $stuff/karmen-conf $fs/usr/bin
pankso@12408 42 cp -a $stuff/xsessions $fs/usr/share
pankso@12408 43 cp -a $stuff/etc $fs
pankso@2894 44 chown 0.0 $fs/usr/bin/*
pankso@2894 45 }
pankso@2894 46
pankso@2894 47 post_install()
pankso@2894 48 {
pascal@18730 49 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
pankso@2894 50 # Adding WM to SLIM available sessions.
pankso@2894 51 if ! echo "$res" | grep -q $PACKAGE; then
pankso@2894 52 echo -n "Adding $PACKAGE to /etc/slim.conf..."
pascal@18730 53 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
pankso@2894 54 status
pankso@2894 55 fi
pankso@2894 56 }
pankso@2894 57
pankso@2894 58 post_remove()
pankso@2894 59 {
pankso@2894 60 # Remove WM from SLIM available sessions.
pascal@18730 61 if grep -q $PACKAGE "$1/etc/slim.conf"; then
pascal@18730 62 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
pankso@2894 63 fi
pankso@2894 64 }