diff options
author | Niki Kovacs <info@microlinux.fr> | 2015-07-29 19:44:39 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-07-29 19:44:39 +0700 |
commit | 3b08844e3268a540048abde6086648a2f8d32518 (patch) | |
tree | c7f0ddcd2aee63a303ac9e76549f3889765eef94 | |
parent | 729ec992d607b1278ca4badae9ea027688d5321a (diff) | |
download | slackbuilds-3b08844e3268a540048abde6086648a2f8d32518.tar.gz |
desktop/luna-wallpapers: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | desktop/luna-wallpapers/luna-wallpapers.SlackBuild | 68 |
1 files changed, 58 insertions, 10 deletions
diff --git a/desktop/luna-wallpapers/luna-wallpapers.SlackBuild b/desktop/luna-wallpapers/luna-wallpapers.SlackBuild index 401d6585e1..54e0caa66a 100644 --- a/desktop/luna-wallpapers/luna-wallpapers.SlackBuild +++ b/desktop/luna-wallpapers/luna-wallpapers.SlackBuild @@ -4,6 +4,8 @@ # Written by Niki Kovacs <info@microlinux.fr> # +# Thanks to Antonio Hernàndez Blas for contributing to the wallpaper preview. +# # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +27,7 @@ PRGNAM=luna-wallpapers VERSION=${VERSION:-0.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} ARCH=noarch @@ -41,12 +43,25 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP +# Xfce 4.10 mkdir -p $PKG/usr/share/xfce4/backdrops -mkdir -p $PKG/usr/share/backgrounds/mate +# Xfce 4.12 +mkdir -p $PKG/usr/share/backgrounds/xfce +# MATE +mkdir -p $PKG/usr/share/backgrounds/mate/luna +# KDE mkdir -p $PKG/usr/share/wallpapers # Xfce default -tar xvf $CWD/$PRGNAM.tar.gz -C $PKG/usr/share/xfce4/backdrops/ +( cd $PKG/usr/share/xfce4/backdrops/ + tar xvf $CWD/$PRGNAM.tar.gz + ls -1 *.* | while read file; do + newfile=$(echo $file | tr ' ' '_') + if [ ! -f "$newfile" ]; then + mv "$file" "$newfile" + fi + done +) chown -R root:root $PKG find -L $PKG \ @@ -55,14 +70,47 @@ find -L $PKG \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Make sure wallpaper preview also works in KDE and MATE -cd $PKG/usr/share/wallpapers -ln -s ../xfce4/backdrops/*.jpg . -cd - +# Wallpaper preview for KDE +( cd $PKG/usr/share/wallpapers + ls -1 ../xfce4/backdrops/*.* | while read file; do + ln -s "$file" . + done +) + +# Wallpaper preview for MATE +( cd $PKG/usr/share/backgrounds/mate/luna + ls -1 ../../../xfce4/backdrops/*.* | while read file; do + ln -s "$file" . + done + mkdir -p $PKG/usr/share/mate-background-properties + cat << EOF > $PKG/usr/share/mate-background-properties/mate-luna.xml +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE wallpapers SYSTEM "mate-wp-list.dtd"> +<wallpapers> +EOF + ls -1 *.* | while read file; do + cat << EOF >> $PKG/usr/share/mate-background-properties/mate-luna.xml + <wallpaper deleted="false"> + <name>$file</name> + <filename>/usr/share/backgrounds/mate/luna/$file</filename> + <pcolor>#27587E</pcolor> + <scolor>#627F5A</scolor> + <options>zoom</options> + </wallpaper> +EOF + done + + cat << EOF >> $PKG/usr/share/mate-background-properties/mate-luna.xml +</wallpapers> +EOF +) -cd $PKG/usr/share/backgrounds/mate -ln -s ../../xfce4/backdrops/*.jpg . -cd - +# Wallpaper preview for Xfce 4.12 +( cd $PKG/usr/share/backgrounds/xfce + ls -1 ../../xfce4/backdrops/*.* | while read file; do + ln -s "$file" . + done +) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/xfce4/backdrops/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION |