wok-next annotate japanes-theme/receipt @ rev 20641

Up cogl, cookutils (1053)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 01 16:03:13 2018 +0300 (2018-05-01)
parents c4e53a39395a
children d5aab818505e
rev   line source
al@18899 1 # SliTaz package receipt.
al@18899 2
al@18899 3 PACKAGE="japanes-theme"
al@18899 4 VERSION="20130705"
al@19126 5 CATEGORY="customization"
al@18899 6 SHORT_DESC="Japanes Openbox and GTK2 Theme"
al@18899 7 MAINTAINER="al.bobylev@gmail.com"
al@18899 8 LICENSE="GPL3"
al@18899 9 WEB_SITE="http://holkfoor.deviantart.com/art/Japanes-Openbox-and-GTK2-Theme-382947891"
al@18899 10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
al@18899 11 WGET_URL="https://www.dropbox.com/s/2ronvzzogtdlmbt/Japanes_GTK2_and_Openbox.tar.bz2"
al@18899 12 TAGS="holkfoor openbox"
al@18899 13
al@18899 14 DEPENDS="gtk-clearlooks openbox"
al@18899 15
al@18899 16 # Rules to configure and make the package.
al@18899 17 compile_rules()
al@18899 18 {
al@18899 19 mkdir -p $install/usr/share/themes
al@18899 20 cp -a $src/Japanes $install/usr/share/themes
al@18899 21
al@18899 22 # (fix warnings about unsupported options)
al@18899 23 sed -i 's|^.*menuitemstyle|#&|; s|^.*listviewitemstyle|#&|;
al@18899 24 s|^.*progressbarstyle|#&|' $install/usr/share/themes/Japanes/gtk-2.0/gtkrc
al@18899 25 }
al@18899 26
al@18899 27 # Rules to gen a SliTaz package suitable for Tazpkg.
al@18899 28 genpkg_rules()
al@18899 29 {
al@18899 30 cp -a $install/* $fs
al@18899 31 }
al@18899 32
al@18899 33 post_install()
al@18899 34 {
al@18899 35 # Set GTK+ Theme
al@18899 36 for i in $1/etc/xdg/lxsession/*/desktop.conf \
al@18899 37 $1/home/*/.config/lxsession/*/desktop.conf; do
al@18899 38 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Japanes|' $i
al@18899 39 done
al@18899 40 pgrep lxsession >/dev/null && lxsession -r
al@18899 41
al@18899 42 # Set Openbox theme
al@18899 43 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
al@18899 44 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Japanes<|' $i
al@18899 45 done
al@18899 46 pgrep openbox >/dev/null && openbox --reconfigure
al@18899 47 }
al@18899 48
al@18899 49 pre_remove() {
al@18899 50 # Restore GTK+ Theme (Clearlooks Human)
al@18899 51 for i in $1/etc/xdg/lxsession/*/desktop.conf \
al@18899 52 $1/home/*/.config/lxsession/*/desktop.conf; do
al@18899 53 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
al@18899 54 done
al@18899 55 pgrep lxsession && lxsession -r
al@18899 56
al@18899 57 # Restore Openbox theme (SliTaz)
al@18899 58 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
al@18899 59 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
al@18899 60 done
al@18899 61 pgrep openbox && openbox --reconfigure
al@18899 62 }