wok-next view madeirado-theme/receipt @ rev 18892
remove: tazpanel-ttf-css, tazpanel-theme-sandfive(in wok-backports)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Fri Feb 12 20:27:04 2016 +0000 (2016-02-12) |
parents | |
children | f8b381f96ad6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="madeirado-theme"
4 VERSION="20130702"
5 CATEGORY="misc"
6 SHORT_DESC="Madeirado theme for GTK2, Openbox, SLiM, and wallparer"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL3"
9 WEB_SITE="http://holkfoor.deviantart.com/art/Madeirado-Pack-Theme-382214228"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WGET_URL="https://dl.dropboxusercontent.com/s/ax6iqx6aa344fsu/Madeirado_GTK2_Openbox_Slim_Wallpaper.tar.bz2"
13 DEPENDS="gtk-clearlooks openbox slim"
14 BUILD_DEPENDS="imagemagick"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 M=Madeirado
20 s=$install/usr/share/slim/themes
21 t=$install/usr/share/themes
22 i=$install/usr/share/images
23 mkdir -p $s $t $i
25 # SLiM theme
26 cp -a $src/slim/$M $s
27 (
28 cd $s/$M
29 convert background.png background.jpg
30 rm background.png
31 )
33 # GTK theme
34 cp -a $src/theme/$M $t
35 # (fix warnings about unsupported options)
36 sed -i 's|^.*menuitemstyle|#&|; s|^.*listviewitemstyle|#&|;
37 s|^.*progressbarstyle|#&|' $t/$M/gtk-2.0/gtkrc
39 # wallpaper
40 ln -s ../slim/themes/$M/background.jpg $i/$M.jpg
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 cp -a $install/* $fs
47 }
49 post_install()
50 {
51 # Set GTK+ Theme
52 for i in $1/etc/xdg/lxsession/*/desktop.conf \
53 $1/home/*/.config/lxsession/*/desktop.conf; do
54 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Madeirado|' $i
55 done
56 pgrep lxsession && lxsession -r
58 # Set Openbox theme
59 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
60 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Madeirado<|' $i
61 done
62 pgrep openbox && openbox --reconfigure
64 # Set SLiM theme
65 chroot "$1/" slim-theme -s Madeirado
67 # Set PCManFM wallpaper
68 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
69 $1/home/*/.config/pcmanfm/*/*.conf; do
70 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Madeirado.jpg|' $i
71 done
72 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
73 # Change wallpaper for current PCManFM session right now
74 su -c 'pcmanfm -w /usr/share/images/Madeirado.jpg' \
75 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
76 fi
77 }
79 pre_remove() {
80 # Restore GTK+ Theme (Clearlooks Human)
81 for i in $1/etc/xdg/lxsession/*/desktop.conf \
82 $1/home/*/.config/lxsession/*/desktop.conf; do
83 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
84 done
85 pgrep lxsession && lxsession -r
87 # Restore Openbox theme (SliTaz)
88 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
89 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
90 done
91 pgrep openbox && openbox --reconfigure
93 # Restore SLiM theme
94 chroot "$1/" slim-theme -f Madeirado
96 # Restore PCManFM wallpaper (slitaz-background.jpg)
97 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
98 $1/home/*/.config/pcmanfm/*/*.conf; do
99 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
100 done
101 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
102 # Change wallpaper for current PCManFM session right now
103 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
104 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
105 fi
106 }