wok-next view aurorials-theme/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | d43bf7aae921 |
children |
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="https://www.deviantart.com/holkfoor/art/Aurorials-pack-themes-382752941"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2"
14 BUILD_DEPENDS="imagemagick"
16 compile_rules() {
17 A=Aurorials
18 s=$install/usr/share/slim/themes
19 t=$install/usr/share/themes
20 i=$install/usr/share/images
21 mkdir -p $s $t $i
23 # SLiM theme
24 cp -a $src/Slim/$A $s
25 (
26 cd $s/$A;
27 convert background.png background.jpg;
28 rm background.png
29 )
31 # GTK theme
32 cp -a $src/GTK2/$A $t
33 # (fix warnings about unsupported options)
34 sed -i 's|^.*gradients|#&|' $t/$A/gtk-2.0/gtkrc
36 # wallpaper
37 ln -s ../slim/themes/$A/background.jpg $i/$A.jpg
38 }
40 genpkg_rules() {
41 cp -a $install/* $fs
42 DEPENDS="gtk2-engine-murrine openbox slim"
43 TAGS="holkfoor openbox slim wallpaper"
44 }
46 post_install() {
47 # Set GTK+ Theme
48 for i in $1/etc/xdg/lxsession/*/desktop.conf \
49 $1/home/*/.config/lxsession/*/desktop.conf; do
50 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i
51 done
52 pgrep lxsession >/dev/null && lxsession -r
54 # Set Openbox theme
55 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
56 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i
57 done
58 pgrep openbox >/dev/null && openbox --reconfigure
60 # Set SLiM theme
61 chroot "$1/" slim-theme -s Aurorials
63 # Set PCManFM wallpaper
64 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
65 $1/home/*/.config/pcmanfm/*/*.conf; do
66 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i
67 done
68 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
69 # Change wallpaper for current PCManFM session right now
70 su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \
71 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
72 fi
73 }
75 pre_remove() {
76 # Restore GTK+ Theme (Clearlooks Human)
77 for i in $1/etc/xdg/lxsession/*/desktop.conf \
78 $1/home/*/.config/lxsession/*/desktop.conf; do
79 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
80 done
81 pgrep lxsession >/dev/null && lxsession -r
83 # Restore Openbox theme (SliTaz)
84 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
85 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
86 done
87 pgrep openbox >/dev/null && openbox --reconfigure
89 # Restore SLiM theme
90 chroot "$1/" slim-theme -f Madeirado
92 # Restore PCManFM wallpaper (slitaz-background.jpg)
93 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
94 $1/home/*/.config/pcmanfm/*/*.conf; do
95 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
96 done
97 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
98 # Change wallpaper for current PCManFM session right now
99 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
100 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
101 fi
102 }