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