wok view aurorials-theme/receipt @ rev 24987
grub: add gpt support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 12 07:08:39 2022 +0000 (2022-05-12) |
parents | 40fab26c175d |
children | 7f7bd3c9775e |
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 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - $WEB_SITE 2>/dev/null | \
22 sed 's|}|}\n|g;s|</|</\n|g' | sed '/dateTime=/!d;s|.*dateTime=.||;s|T.*||;s|-||g;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 A=Aurorials
29 s=$install/usr/share/slim/themes
30 t=$install/usr/share/themes
31 i=$install/usr/share/images
32 mkdir -p $s $t $i
34 # SLiM theme
35 cp -a $src/Slim/$A $s
36 (
37 cd $s/$A;
38 convert background.png background.jpg;
39 rm background.png
40 )
42 # GTK theme
43 cp -a $src/GTK2/$A $t
44 # (fix warnings about unsupported options)
45 sed -i 's|^.*gradients|#&|' $t/$A/gtk-2.0/gtkrc
47 # wallpaper
48 ln -s ../slim/themes/$A/background.jpg $i/$A.jpg
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 genpkg_rules()
53 {
54 cp -a $install/* $fs
55 }
57 post_install()
58 {
59 # Set GTK+ Theme
60 for i in $1/etc/xdg/lxsession/*/desktop.conf \
61 $1/home/*/.config/lxsession/*/desktop.conf; do
62 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i
63 done
64 pgrep lxsession >/dev/null && lxsession -r
66 # Set Openbox theme
67 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
68 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i
69 done
70 pgrep openbox >/dev/null && openbox --reconfigure
72 # Set SLiM theme
73 chroot "$1/" slim-theme -s Aurorials
75 # Set PCManFM wallpaper
76 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
77 $1/home/*/.config/pcmanfm/*/*.conf; do
78 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i
79 done
80 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
81 # Change wallpaper for current PCManFM session right now
82 su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \
83 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
84 fi
85 }
87 pre_remove() {
88 # Restore GTK+ Theme (Clearlooks Human)
89 for i in $1/etc/xdg/lxsession/*/desktop.conf \
90 $1/home/*/.config/lxsession/*/desktop.conf; do
91 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
92 done
93 pgrep lxsession >/dev/null && lxsession -r
95 # Restore Openbox theme (SliTaz)
96 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
97 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
98 done
99 pgrep openbox >/dev/null && openbox --reconfigure
101 # Restore SLiM theme
102 chroot "$1/" slim-theme -f Madeirado
104 # Restore PCManFM wallpaper (slitaz-background.jpg)
105 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
106 $1/home/*/.config/pcmanfm/*/*.conf; do
107 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
108 done
109 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
110 # Change wallpaper for current PCManFM session right now
111 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
112 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
113 fi
114 }