wok-6.x annotate conky-theme-onsea/receipt @ rev 20875

updated erlang (R15B01 -> 21.2.5)
author Hans-G?nter Theisgen
date Sat Feb 23 15:57:08 2019 +0100 (2019-02-23)
parents ad8378dca880
children 2a0479881723
rev   line source
hackdorte@19066 1 # SliTaz package receipt.
hackdorte@19066 2
hackdorte@19066 3 PACKAGE="conky-theme-onsea"
hackdorte@19066 4 VERSION="0.1"
hackdorte@19066 5 CATEGORY="x-window"
hackdorte@19066 6 SHORT_DESC="A smooth theme for conky with smoke color."
hackdorte@19066 7 MAINTAINER="hackdorte@sapo.pt"
hackdorte@19066 8 LICENSE="PublicDomain"
hackdorte@19066 9 SOURCE="onsea"
hackdorte@19066 10 WEB_SITE="http://people.slitaz.org/~leonardolaporte"
hackdorte@19066 11 STUFF_DIR="lab.slitaz/5.0/pkg/conky/1.9.0"
hackdorte@19066 12 TARBALL="$SOURCE-$VERSION.tar.gz"
hackdorte@19066 13 WGET_URL="${WEB_SITE}/$STUFF_DIR/$TARBALL"
hackdorte@19069 14 TAGS="conky desktop monitoring theme"
hackdorte@19069 15 HOST_ARCH="i486"
hackdorte@19066 16
hackdorte@19066 17 DEPENDS="conky"
hackdorte@19066 18 BUILD_DEPENDS="wget"
hackdorte@19066 19
hackdorte@19069 20 BAK_DIR=".conky-backup"
hackdorte@19069 21 BAK_FILE="old_conkyrc"
hackdorte@19066 22
hackdorte@19066 23 # Rules to configure and make the package.
hackdorte@19066 24 compile_rules()
hackdorte@19066 25 {
hackdorte@19066 26 mkdir -p $install/usr/share/conky/themes/$SOURCE
hackdorte@19066 27 cp -a $src/.conkyrc $install/usr/share/conky/themes/$SOURCE/.conkyrc
hackdorte@19066 28 }
hackdorte@19066 29
hackdorte@19066 30 # Rules to gen a SliTaz package suitable for Tazpkg.
hackdorte@19066 31 genpkg_rules()
hackdorte@19066 32 {
hackdorte@19066 33 cp -a $install/* $fs
hackdorte@19066 34 }
hackdorte@19066 35
hackdorte@19066 36 pre_install()
hackdorte@19066 37 {
hackdorte@19066 38 # Build current ".conkyrc" backup.
pascal@19068 39 if [ -e $1/home/$USER/.conkyrc ]; then
hackdorte@19069 40 mkdir -p $1/home/$USER/$BAK_DIR/$BAK_FILE
hackdorte@19069 41 mv $1/home/$USER/.conkyrc $1/home/$USER/$BAK_DIR/$BAK_FILE
hackdorte@19066 42
hackdorte@19066 43 # README (Alert file only).
pascal@19068 44 cat > $1/home/$USER/$BAK_DIR/README <<EOT
hackdorte@19066 45
hackdorte@19066 46 $PACKAGE Backup
hackdorte@19066 47 ==============================================
hackdorte@19066 48 $(date)
hackdorte@19066 49
hackdorte@19066 50 Please do not remove this directory manually.
hackdorte@19066 51
hackdorte@19066 52 Run: tazpkg remove $PACKAGE
hackdorte@19066 53
hackdorte@19066 54 EOT
hackdorte@19066 55 fi
hackdorte@19066 56 }
hackdorte@19066 57
hackdorte@19066 58 post_install()
hackdorte@19066 59 {
hackdorte@19066 60 # Install new ".conkyrc" to (home/user).
hackdorte@19066 61 # And create a link to the original file.
pascal@19068 62 cd $1/home/$USER
pascal@19068 63 ln -s /usr/share/conky/themes/$SOURCE/.conkyrc $1/home/$USER/.conkyrc
hackdorte@19069 64 ### chmod 755 $1/home/$USER/.conkyrc
hackdorte@19066 65
hackdorte@19066 66 # Check the conky process and run new theme.
hackdorte@19069 67 [ "$1" ] ||
hackdorte@19066 68 if busybox pidof conky >>/dev/null 2>&1; then
hackdorte@19066 69 su - $USER -c "killall conky" && su - $USER -c "conky &";
hackdorte@19066 70 else
hackdorte@19066 71 su - $USER -c "conky &";
hackdorte@19066 72 fi
hackdorte@19066 73 }
hackdorte@19066 74
hackdorte@19066 75 pre_remove()
hackdorte@19066 76 {
hackdorte@19066 77 # Restore old ".conkyrc" backup.
pascal@19068 78 if [ -e $1/home/$USER/$BAK_DIR/$BAK_FILE/.conkyrc ]; then
pascal@19068 79 mv $1/home/$USER/$BAK_DIR/$BAK_FILE/.conkyrc $1/home/$USER
pascal@19068 80 chmod 777 $1/home/$USER/.conkyrc
pascal@19068 81 rm -rf $1/home/$USER/$BAK_DIR/$BAK_FILE
pascal@19068 82 rm -rf $1/home/$USER/$BAK_DIR/README
hackdorte@19066 83 else
hackdorte@19069 84 rm -irf $1/home/$USER/.conkyrc
hackdorte@19066 85 fi
hackdorte@19066 86 }
hackdorte@19066 87
hackdorte@19066 88 post_remove()
hackdorte@19066 89 {
hackdorte@19066 90 # Check the conky process and run old theme.
hackdorte@19069 91 [ "$1" ] ||
hackdorte@19066 92 if busybox pidof conky >>/dev/null 2>&1; then
hackdorte@19066 93 su - $USER -c "killall conky" && su - $USER -c "conky &";
hackdorte@19066 94 else
hackdorte@19066 95 su - $USER -c "conky &";
hackdorte@19066 96 fi
hackdorte@19066 97 }