wok diff aurorials-theme/receipt @ rev 18888

Add aurorials-theme and madeirado-theme (Art by Leonardo Laporte, theme switchers mine)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Feb 12 15:51:10 2016 +0200 (2016-02-12)
parents
children f8b381f96ad6
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/aurorials-theme/receipt	Fri Feb 12 15:51:10 2016 +0200
     1.3 @@ -0,0 +1,105 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="aurorials-theme"
     1.7 +VERSION="20130704"
     1.8 +CATEGORY="misc"
     1.9 +SHORT_DESC="Aurorials theme for GTK2, Openbox, SLiM, and wallparer"
    1.10 +MAINTAINER="al.bobylev@gmail.com"
    1.11 +LICENSE="GPL3"
    1.12 +WEB_SITE="http://holkfoor.deviantart.com/art/Aurorials-pack-themes-382752941"
    1.13 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.14 +WGET_URL="https://dl.dropboxusercontent.com/s/urt40kxaladwpeu/Aurorials_GTK2_Openbox_Slim_Wallpaper.tar.bz2"
    1.15 +
    1.16 +DEPENDS="gtk2-engine-murrine openbox slim"
    1.17 +BUILD_DEPENDS="imagemagick"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	A=Aurorials
    1.23 +	s=$install/usr/share/slim/themes
    1.24 +	t=$install/usr/share/themes
    1.25 +	i=$install/usr/share/images
    1.26 +	mkdir -p $s $t $i
    1.27 +
    1.28 +	# SLiM theme
    1.29 +	cp -a $src/Slim/$A $s
    1.30 +	(
    1.31 +		cd $s/$A;
    1.32 +		convert background.png background.jpg;
    1.33 +		rm background.png
    1.34 +	)
    1.35 +
    1.36 +	# GTK theme
    1.37 +	cp -a $src/GTK2/$A $t
    1.38 +	# (fix warnings about unsupported options)
    1.39 +	sed -i 's|^.*gradients|#&|' $t/$A/gtk-2.0/gtkrc
    1.40 +
    1.41 +	# wallpaper
    1.42 +	ln -s ../slim/themes/$A/background.jpg $i/$A.jpg
    1.43 +}
    1.44 +
    1.45 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.46 +genpkg_rules()
    1.47 +{
    1.48 +	cp -a $install/* $fs
    1.49 +}
    1.50 +
    1.51 +post_install()
    1.52 +{
    1.53 +	# Set GTK+ Theme
    1.54 +	for i in $1/etc/xdg/lxsession/*/desktop.conf \
    1.55 +		$1/home/*/.config/lxsession/*/desktop.conf; do
    1.56 +		[ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Aurorials|' $i
    1.57 +	done
    1.58 +	pgrep lxsession && lxsession -r
    1.59 +
    1.60 +	# Set Openbox theme
    1.61 +	for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
    1.62 +		[ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Aurorials<|' $i
    1.63 +	done
    1.64 +	pgrep openbox && openbox --reconfigure
    1.65 +
    1.66 +	# Set SLiM theme
    1.67 +	chroot "$1/" slim-theme -s Aurorials
    1.68 +
    1.69 +	# Set PCManFM wallpaper
    1.70 +	for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
    1.71 +		$1/home/*/.config/pcmanfm/*/*.conf; do
    1.72 +		[ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/Aurorials.jpg|' $i
    1.73 +	done
    1.74 +	if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
    1.75 +		# Change wallpaper for current PCManFM session right now
    1.76 +		su -c 'pcmanfm -w /usr/share/images/Aurorials.jpg' \
    1.77 +			$(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
    1.78 +	fi
    1.79 +}
    1.80 +
    1.81 +pre_remove() {
    1.82 +	# Restore GTK+ Theme (Clearlooks Human)
    1.83 +	for i in $1/etc/xdg/lxsession/*/desktop.conf \
    1.84 +		$1/home/*/.config/lxsession/*/desktop.conf; do
    1.85 +		[ -f "$i" ] && sed -i 's|sNet/ThemeName=.*|sNet/ThemeName=Clearlooks Human|' $i
    1.86 +	done
    1.87 +	pgrep lxsession && lxsession -r
    1.88 +
    1.89 +	# Restore Openbox theme (SliTaz)
    1.90 +	for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do
    1.91 +		[ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
    1.92 +	done
    1.93 +	pgrep openbox && openbox --reconfigure
    1.94 +
    1.95 +	# Restore SLiM theme
    1.96 +	chroot "$1/" slim-theme -f Madeirado
    1.97 +
    1.98 +	# Restore PCManFM wallpaper (slitaz-background.jpg)
    1.99 +	for i in $1/etc/xdg/pcmanfm/default/pcmanfm.conf \
   1.100 +		$1/home/*/.config/pcmanfm/*/*.conf; do
   1.101 +		[ -f "$i" ] && sed -i 's|wallpaper[0-9]*=.*|wallpaper=/usr/share/images/slitaz-background.jpg|' $i
   1.102 +	done
   1.103 +	if [ -z "$1" -a -n "$(pgrep pcmanfm)" ]; then
   1.104 +		# Change wallpaper for current PCManFM session right now
   1.105 +		su -c 'pcmanfm -w /usr/share/images/slitaz-background.jpg' \
   1.106 +			$(ps aux | grep '[p]cmanfm' | awk 'END{print $2}')
   1.107 +	fi
   1.108 +}