wok-current annotate madeirado-theme/receipt @ rev 25549

created recipe for lesspipe
author Hans-G?nter Theisgen
date Mon Apr 03 06:53:23 2023 +0100 (19 months ago)
parents 7f7bd3c9775e
children
rev   line source
al@18888 1 # SliTaz package receipt.
al@18888 2
al@18888 3 PACKAGE="madeirado-theme"
al@18888 4 VERSION="20130702"
al@19126 5 CATEGORY="customization"
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"
pascal@25540 9 WEB_SITE="https://holkfoor.deviantart.com/art/Madeirado-Pack-Theme-382214228"
al@18888 10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@25504 11 WGET_URL="https://web.archive.org/web/20230129190806if_/https://dl.dropboxusercontent.com/s/ax6iqx6aa344fsu/Madeirado_GTK2_Openbox_Slim_Wallpaper.tar.bz2"
al@18899 12 TAGS="holkfoor openbox slim wallpaper"
al@19114 13 #HOST_ARCH="any" # imagemagick missing in arm
al@18888 14
al@18888 15 DEPENDS="gtk-clearlooks openbox slim"
al@18899 16 BUILD_DEPENDS="wget imagemagick"
al@18888 17
pascal@24744 18 # What is the latest version available today?
pascal@24744 19 current_version()
pascal@24744 20 {
pascal@24744 21 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24744 22 sed 's|}|}\n|g;s|</|</\n|g' | sed '/dateTime=/!d;s|.*dateTime=.||;s|T.*||;s|-||g;q'
pascal@24744 23 }
pascal@24744 24
al@18888 25 # Rules to configure and make the package.
al@18888 26 compile_rules()
al@18888 27 {
al@18888 28 M=Madeirado
al@18888 29 s=$install/usr/share/slim/themes
al@18888 30 t=$install/usr/share/themes
al@18888 31 i=$install/usr/share/images
al@18888 32 mkdir -p $s $t $i
al@18888 33
al@18888 34 # SLiM theme
al@18888 35 cp -a $src/slim/$M $s
al@18888 36 (
al@18888 37 cd $s/$M
al@18888 38 convert background.png background.jpg
al@18888 39 rm background.png
al@18888 40 )
al@18888 41
al@18888 42 # GTK theme
al@18888 43 cp -a $src/theme/$M $t
al@18888 44 # (fix warnings about unsupported options)
al@18888 45 sed -i 's|^.*menuitemstyle|#&|; s|^.*listviewitemstyle|#&|;
al@18888 46 s|^.*progressbarstyle|#&|' $t/$M/gtk-2.0/gtkrc
al@18888 47
al@18888 48 # wallpaper
al@18888 49 ln -s ../slim/themes/$M/background.jpg $i/$M.jpg
al@18888 50 }
al@18888 51
al@18888 52 # Rules to gen a SliTaz package suitable for Tazpkg.
al@18888 53 genpkg_rules()
al@18888 54 {
al@18888 55 cp -a $install/* $fs
al@18888 56 }
al@18888 57
al@18888 58 post_install()
al@18888 59 {
al@18888 60 # Set GTK+ Theme
al@18888 61 for i in $1/etc/xdg/lxsession/*/desktop.conf \
al@18888 62 $1/home/*/.config/lxsession/*/desktop.conf; do
al@18888 63 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Madeirado|' $i
al@18888 64 done
al@18899 65 pgrep lxsession >/dev/null && lxsession -r
al@18888 66
al@18888 67 # Set Openbox theme
al@18888 68 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
al@18888 69 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Madeirado<|' $i
al@18888 70 done
al@18899 71 pgrep openbox >/dev/null && openbox --reconfigure
al@18888 72
al@18888 73 # Set SLiM theme
al@18888 74 chroot "$1/" slim-theme -s Madeirado
al@18888 75
al@18888 76 # Set PCManFM wallpaper
al@18888 77 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
al@18888 78 $1/home/*/.config/pcmanfm/*/*.conf; do
al@18888 79 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Madeirado.jpg|' $i
al@18888 80 done
al@18888 81 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
al@18888 82 # Change wallpaper for current PCManFM session right now
al@18888 83 su -c 'pcmanfm -w /usr/share/images/Madeirado.jpg' \
al@18888 84 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
al@18888 85 fi
al@18888 86 }
al@18888 87
al@18888 88 pre_remove() {
al@18888 89 # Restore GTK+ Theme (Clearlooks Human)
al@18888 90 for i in $1/etc/xdg/lxsession/*/desktop.conf \
al@18888 91 $1/home/*/.config/lxsession/*/desktop.conf; do
al@18888 92 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
al@18888 93 done
al@18899 94 pgrep lxsession >/dev/null && lxsession -r
al@18888 95
al@18888 96 # Restore Openbox theme (SliTaz)
al@18888 97 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
al@18888 98 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
al@18888 99 done
al@18899 100 pgrep openbox >/dev/null && openbox --reconfigure
al@18888 101
al@18888 102 # Restore SLiM theme
al@18888 103 chroot "$1/" slim-theme -f Madeirado
al@18888 104
al@18888 105 # Restore PCManFM wallpaper (slitaz-background.jpg)
al@18888 106 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
al@18888 107 $1/home/*/.config/pcmanfm/*/*.conf; do
al@18888 108 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
al@18888 109 done
al@18888 110 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
al@18888 111 # Change wallpaper for current PCManFM session right now
al@18888 112 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
al@18888 113 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
al@18888 114 fi
al@18888 115 }