wok-6.x view japanes-theme/receipt @ rev 19007

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