wok annotate madeirado-theme/receipt @ rev 19055

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