From 3b08844e3268a540048abde6086648a2f8d32518 Mon Sep 17 00:00:00 2001 From: Niki Kovacs Date: Wed, 29 Jul 2015 19:44:39 +0700 Subject: desktop/luna-wallpapers: Update script. Signed-off-by: Willy Sudiarto Raharjo --- desktop/luna-wallpapers/luna-wallpapers.SlackBuild | 68 ++++++++++++++++++---- 1 file 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 # +# 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 + + + +EOF + ls -1 *.* | while read file; do + cat << EOF >> $PKG/usr/share/mate-background-properties/mate-luna.xml + + $file + /usr/share/backgrounds/mate/luna/$file + #27587E + #627F5A + zoom + +EOF + done + + cat << EOF >> $PKG/usr/share/mate-background-properties/mate-luna.xml + +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 -- cgit v1.2.3