wok view japanes-theme/receipt @ rev 21920

Add pcem
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 05 16:15:48 2019 +0200 (22 months ago)
parents 887b3b11683d
children
line source
1 # SliTaz package receipt.
3 PACKAGE="japanes-theme"
4 VERSION="20130705"
5 CATEGORY="customization"
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"
13 HOST_ARCH="any"
15 DEPENDS="gtk-clearlooks openbox"
16 BUILD_DEPENDS="wget"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 mkdir -p $install/usr/share/themes
22 cp -a $src/Japanes $install/usr/share/themes
24 # (fix warnings about unsupported options)
25 sed -i 's|^.*menuitemstyle|#&|; s|^.*listviewitemstyle|#&|;
26 s|^.*progressbarstyle|#&|' $install/usr/share/themes/Japanes/gtk-2.0/gtkrc
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 cp -a $install/* $fs
33 }
35 post_install()
36 {
37 # Set GTK+ Theme
38 for i in $1/etc/xdg/lxsession/*/desktop.conf \
39 $1/home/*/.config/lxsession/*/desktop.conf; do
40 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Japanes|' $i
41 done
42 pgrep lxsession >/dev/null && lxsession -r
44 # Set Openbox theme
45 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
46 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Japanes<|' $i
47 done
48 pgrep openbox >/dev/null && openbox --reconfigure
49 }
51 pre_remove() {
52 # Restore GTK+ Theme (Clearlooks Human)
53 for i in $1/etc/xdg/lxsession/*/desktop.conf \
54 $1/home/*/.config/lxsession/*/desktop.conf; do
55 [ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
56 done
57 pgrep lxsession && lxsession -r
59 # Restore Openbox theme (SliTaz)
60 for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
61 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
62 done
63 pgrep openbox && openbox --reconfigure
64 }