wok diff conky-theme-onsea/receipt @ rev 22710

updated f3 (2.2 -> 7.2)
author Hans-G?nter Theisgen
date Wed Jan 22 09:41:20 2020 +0100 (2020-01-22)
parents ad8378dca880
children 2a0479881723
line diff
     1.1 --- a/conky-theme-onsea/receipt	Thu Apr 21 22:04:50 2016 +0200
     1.2 +++ b/conky-theme-onsea/receipt	Wed Jan 22 09:41:20 2020 +0100
     1.3 @@ -11,13 +11,14 @@
     1.4  STUFF_DIR="lab.slitaz/5.0/pkg/conky/1.9.0"
     1.5  TARBALL="$SOURCE-$VERSION.tar.gz"
     1.6  WGET_URL="${WEB_SITE}/$STUFF_DIR/$TARBALL"
     1.7 -TAGS="conky theme"
     1.8 +TAGS="conky desktop monitoring theme"
     1.9 +HOST_ARCH="i486"
    1.10  
    1.11  DEPENDS="conky"
    1.12  BUILD_DEPENDS="wget"
    1.13  
    1.14 -BAK_DIR=".conky-backups"
    1.15 -BAK_FILE="DEwioa80aejskDFPels0" # I do not know how to improve it. I write it manually. There is an automatic method?
    1.16 +BAK_DIR=".conky-backup"
    1.17 +BAK_FILE="old_conkyrc"
    1.18  
    1.19  # Rules to configure and make the package.
    1.20  compile_rules()
    1.21 @@ -34,12 +35,10 @@
    1.22  
    1.23  pre_install()
    1.24  {
    1.25 -
    1.26  # Build current ".conkyrc" backup.
    1.27 -
    1.28  if [ -e $1/home/$USER/.conkyrc ]; then
    1.29 -mkdir -p $1/home/$USER/$BAK_DIR/$BAK_FILE
    1.30 -mv $1/home/$USER/.conkyrc $1/home/$USER/$BAK_DIR/$BAK_FILE
    1.31 +  mkdir -p $1/home/$USER/$BAK_DIR/$BAK_FILE
    1.32 +  mv $1/home/$USER/.conkyrc $1/home/$USER/$BAK_DIR/$BAK_FILE
    1.33  
    1.34  # README (Alert file only).
    1.35  cat > $1/home/$USER/$BAK_DIR/README <<EOT
    1.36 @@ -53,60 +52,46 @@
    1.37    Run: tazpkg remove $PACKAGE
    1.38  
    1.39  EOT
    1.40 -
    1.41 -else
    1.42 -  echo "No .conkyrc file for backup.";
    1.43  fi
    1.44 -
    1.45  }
    1.46  
    1.47  post_install()
    1.48  {
    1.49 -
    1.50  # Install new ".conkyrc" to (home/user).
    1.51  # And create a link to the original file.
    1.52 -
    1.53    cd $1/home/$USER
    1.54    ln -s /usr/share/conky/themes/$SOURCE/.conkyrc $1/home/$USER/.conkyrc
    1.55 -  chmod 755 $1/home/$USER/.conkyrc
    1.56 +  ### chmod 755 $1/home/$USER/.conkyrc
    1.57  
    1.58  # Check the conky process and run new theme.
    1.59 -
    1.60 -  [ "$1" ] ||
    1.61 +[ "$1" ] ||
    1.62    if busybox pidof conky >>/dev/null 2>&1; then
    1.63      su - $USER -c "killall conky" && su - $USER -c "conky &";
    1.64    else
    1.65      su - $USER -c "conky &";
    1.66    fi
    1.67 -
    1.68  }
    1.69  
    1.70  pre_remove()
    1.71  {
    1.72 -
    1.73  # Restore old ".conkyrc" backup.
    1.74 -
    1.75    if [ -e $1/home/$USER/$BAK_DIR/$BAK_FILE/.conkyrc ]; then
    1.76      mv $1/home/$USER/$BAK_DIR/$BAK_FILE/.conkyrc $1/home/$USER
    1.77      chmod 777 $1/home/$USER/.conkyrc
    1.78      rm -rf $1/home/$USER/$BAK_DIR/$BAK_FILE
    1.79      rm -rf $1/home/$USER/$BAK_DIR/README
    1.80    else
    1.81 -    echo "Empty! No backup files.";
    1.82 +    rm -irf $1/home/$USER/.conkyrc
    1.83    fi
    1.84 -
    1.85  }
    1.86  
    1.87  post_remove()
    1.88  {
    1.89 -
    1.90  # Check the conky process and run old theme.
    1.91 -
    1.92 -  [ "$1" ] ||
    1.93 +[ "$1" ] ||
    1.94    if busybox pidof conky >>/dev/null 2>&1; then
    1.95      su - $USER -c "killall conky" && su - $USER -c "conky &";
    1.96    else
    1.97      su - $USER -c "conky &";
    1.98    fi
    1.99 -
   1.100  }