wok view aurorials-theme/receipt @ rev 23214
updated nagvis and nagvis-doc (1.9.11 -> 1.9.18)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Mar 21 15:07:17 2020 +0100 (2020-03-21) |
parents | 887b3b11683d |
children | b01314c762e9 |
line source
1 # SliTaz package receipt.
3 PACKAGE="aurorials-theme"
4 VERSION="20130704"
5 CATEGORY="customization"
6 SHORT_DESC="Aurorials theme for GTK2, Openbox, SLiM, and wallparer"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL3"
9 WEB_SITE="http://holkfoor.deviantart.com/art/Aurorials-pack-themes-382752941"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WGET_URL="https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2"
12 TAGS="holkfoor openbox slim wallpaper"
13 HOST_ARCH="any"
15 DEPENDS="gtk2-engine-murrine openbox slim"
16 BUILD_DEPENDS="wget imagemagick"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 A=Aurorials
22 s=$install/usr/share/slim/themes
23 t=$install/usr/share/themes
24 i=$install/usr/share/images
25 mkdir -p $s $t $i
27 # SLiM theme
28 cp -a $src/Slim/$A $s
29 (
30 cd $s/$A;
31 convert background.png background.jpg;
32 rm background.png
33 )
35 # GTK theme
36 cp -a $src/GTK2/$A $t
37 # (fix warnings about unsupported options)
38 sed -i 's|^.*gradients|#&|' $t/$A/gtk-2.0/gtkrc
40 # wallpaper
41 ln -s ../slim/themes/$A/background.jpg $i/$A.jpg
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 cp -a $install/* $fs
48 }
50 post_install()
51 {
52 # Set GTK+ Theme
53 for i in $1/etc/xdg/lxsession/*/desktop.conf \
54 $1/home/*/.config/lxsession/*/desktop.conf; do
55 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i
56 done
57 pgrep lxsession >/dev/null && lxsession -r
59 # Set Openbox theme
60 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
61 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i
62 done
63 pgrep openbox >/dev/null && openbox --reconfigure
65 # Set SLiM theme
66 chroot "$1/" slim-theme -s Aurorials
68 # Set PCManFM wallpaper
69 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
70 $1/home/*/.config/pcmanfm/*/*.conf; do
71 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i
72 done
73 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
74 # Change wallpaper for current PCManFM session right now
75 su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \
76 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
77 fi
78 }
80 pre_remove() {
81 # Restore GTK+ Theme (Clearlooks Human)
82 for i in $1/etc/xdg/lxsession/*/desktop.conf \
83 $1/home/*/.config/lxsession/*/desktop.conf; do
84 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
85 done
86 pgrep lxsession >/dev/null && lxsession -r
88 # Restore Openbox theme (SliTaz)
89 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
90 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
91 done
92 pgrep openbox >/dev/null && openbox --reconfigure
94 # Restore SLiM theme
95 chroot "$1/" slim-theme -f Madeirado
97 # Restore PCManFM wallpaper (slitaz-background.jpg)
98 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
99 $1/home/*/.config/pcmanfm/*/*.conf; do
100 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
101 done
102 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
103 # Change wallpaper for current PCManFM session right now
104 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
105 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
106 fi
107 }