wok-current annotate aurorials-theme/receipt @ rev 18914
Add: Tuffy Font Family. Tag: Sans Serif. Public Domain License.
author | Leonardo Laporte <hackdorte@sapo.pt> |
---|---|
date | Wed Feb 24 06:16:15 2016 -0300 (2016-02-24) |
parents | e068415d64ee |
children | 887b3b11683d |
rev | line source |
---|---|
al@18888 | 1 # SliTaz package receipt. |
al@18888 | 2 |
al@18888 | 3 PACKAGE="aurorials-theme" |
al@18888 | 4 VERSION="20130704" |
al@18888 | 5 CATEGORY="misc" |
al@18888 | 6 SHORT_DESC="Aurorials 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/Aurorials-pack-themes-382752941" |
al@18888 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
al@18888 | 11 WGET_URL="https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2" |
al@18899 | 12 TAGS="holkfoor openbox slim wallpaper" |
al@18888 | 13 |
al@18888 | 14 DEPENDS="gtk2-engine-murrine 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 A=Aurorials |
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/$A $s |
al@18888 | 28 ( |
al@18888 | 29 cd $s/$A; |
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/GTK2/$A $t |
al@18888 | 36 # (fix warnings about unsupported options) |
al@18888 | 37 sed -i 's|^.*gradients|#&|' $t/$A/gtk-2.0/gtkrc |
al@18888 | 38 |
al@18888 | 39 # wallpaper |
al@18888 | 40 ln -s ../slim/themes/$A/background.jpg $i/$A.jpg |
al@18888 | 41 } |
al@18888 | 42 |
al@18888 | 43 # Rules to gen a SliTaz package suitable for Tazpkg. |
al@18888 | 44 genpkg_rules() |
al@18888 | 45 { |
al@18888 | 46 cp -a $install/* $fs |
al@18888 | 47 } |
al@18888 | 48 |
al@18888 | 49 post_install() |
al@18888 | 50 { |
al@18888 | 51 # Set GTK+ Theme |
al@18888 | 52 for i in $1/etc/xdg/lxsession/*/desktop.conf \ |
al@18888 | 53 $1/home/*/.config/lxsession/*/desktop.conf; do |
al@18888 | 54 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i |
al@18888 | 55 done |
al@18899 | 56 pgrep lxsession >/dev/null && lxsession -r |
al@18888 | 57 |
al@18888 | 58 # Set Openbox theme |
al@18888 | 59 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do |
al@18888 | 60 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i |
al@18888 | 61 done |
al@18899 | 62 pgrep openbox >/dev/null && openbox --reconfigure |
al@18888 | 63 |
al@18888 | 64 # Set SLiM theme |
al@18888 | 65 chroot "$1/" slim-theme -s Aurorials |
al@18888 | 66 |
al@18888 | 67 # Set PCManFM wallpaper |
al@18888 | 68 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \ |
al@18888 | 69 $1/home/*/.config/pcmanfm/*/*.conf; do |
al@18888 | 70 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i |
al@18888 | 71 done |
al@18888 | 72 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then |
al@18888 | 73 # Change wallpaper for current PCManFM session right now |
al@18888 | 74 su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \ |
al@18888 | 75 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}') |
al@18888 | 76 fi |
al@18888 | 77 } |
al@18888 | 78 |
al@18888 | 79 pre_remove() { |
al@18888 | 80 # Restore GTK+ Theme (Clearlooks Human) |
al@18888 | 81 for i in $1/etc/xdg/lxsession/*/desktop.conf \ |
al@18888 | 82 $1/home/*/.config/lxsession/*/desktop.conf; do |
al@18888 | 83 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i |
al@18888 | 84 done |
al@18899 | 85 pgrep lxsession >/dev/null && lxsession -r |
al@18888 | 86 |
al@18888 | 87 # Restore Openbox theme (SliTaz) |
al@18888 | 88 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do |
al@18888 | 89 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i |
al@18888 | 90 done |
al@18899 | 91 pgrep openbox >/dev/null && openbox --reconfigure |
al@18888 | 92 |
al@18888 | 93 # Restore SLiM theme |
al@18888 | 94 chroot "$1/" slim-theme -f Madeirado |
al@18888 | 95 |
al@18888 | 96 # Restore PCManFM wallpaper (slitaz-background.jpg) |
al@18888 | 97 for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \ |
al@18888 | 98 $1/home/*/.config/pcmanfm/*/*.conf; do |
al@18888 | 99 [ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i |
al@18888 | 100 done |
al@18888 | 101 if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then |
al@18888 | 102 # Change wallpaper for current PCManFM session right now |
al@18888 | 103 su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \ |
al@18888 | 104 $(ps aux | grep '[p]cmanfm' | awk 'END{print $2}') |
al@18888 | 105 fi |
al@18888 | 106 } |