summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Rojas2017-03-24 10:08:11 +0000
committerAntonio Rojas2017-03-24 10:08:11 +0000
commitfdacf4c356ec00247927c1c57c6f498e768168d8 (patch)
tree6553e6fe847a9c078ece9af353b3f9978ff31d99
downloadaur-fdacf4c356ec00247927c1c57c6f498e768168d8.tar.gz
Drop from community
-rw-r--r--.SRCINFO18
-rw-r--r--LICENSE9
-rw-r--r--PKGBUILD26
-rwxr-xr-xmigrate-xscreensaver-config.sh34
-rw-r--r--xscreensaver-config.xsl27
5 files changed, 114 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d912e33849ee
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = mate-screensaver-hacks
+ pkgdesc = Enable screensavers from xscreensaver for MATE.
+ pkgver = 5.26
+ pkgrel = 1
+ url = http://www.jwz.org/xscreensaver/
+ arch = any
+ license = BSD
+ makedepends = libxslt
+ depends = xscreensaver
+ source = migrate-xscreensaver-config.sh
+ source = xscreensaver-config.xsl
+ source = LICENSE
+ sha1sums = 19195ef59f0dbc61c6ed599a968213a8f0a7a5d4
+ sha1sums = 68e8ec7a4f7077f7f870b904f370329f5e95bce0
+ sha1sums = 4209ea586b204fd1d81c382a0522c654f9fd9134
+
+pkgname = mate-screensaver-hacks
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..4f587b5a36fe
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,9 @@
+/* xscreensaver, Copyright (c) 1993-2006 Jamie Zawinski <jwz@jwz.org>
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ebc37d82ddb0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 105042 2014-01-30 17:11:55Z flexiondotorg $
+# Maintainer: Martin Wimpress <code@flexion.org>
+
+pkgname=mate-screensaver-hacks
+pkgver=5.26
+pkgrel=1
+pkgdesc="Enable screensavers from xscreensaver for MATE."
+arch=('any')
+url="http://www.jwz.org/xscreensaver/"
+license=('BSD')
+depends=('xscreensaver')
+makedepends=('libxslt')
+source=(migrate-xscreensaver-config.sh
+ xscreensaver-config.xsl
+ LICENSE)
+sha1sums=('19195ef59f0dbc61c6ed599a968213a8f0a7a5d4'
+ '68e8ec7a4f7077f7f870b904f370329f5e95bce0'
+ '4209ea586b204fd1d81c382a0522c654f9fd9134')
+
+package() {
+ mkdir -p "${pkgdir}/usr/share/applications/screensavers/"
+ cd "${pkgdir}/usr/share/applications/screensavers/"
+ sh "$srcdir/migrate-xscreensaver-config.sh" /usr/share/xscreensaver/config/*.xml
+ rm ${pkgdir}/usr/share/applications/screensavers/popsquares.desktop
+ install -D -m644 ${srcdir}/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/migrate-xscreensaver-config.sh b/migrate-xscreensaver-config.sh
new file mode 100755
index 000000000000..860a0d5dd25c
--- /dev/null
+++ b/migrate-xscreensaver-config.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+DIST_BIN=`dirname "$0"`
+
+CMD=xsltproc
+XSL=${DIST_BIN}/xscreensaver-config.xsl
+
+if test "x$1" = "x" -o "x$1" = "x-h" -o "x$1" = "x--help"; then
+ echo "usage: $0 [file] ..."
+ exit 1
+fi
+
+if [ ! -r ${XSL} ]; then
+ echo "Cannot find XSLT file"
+ exit 1
+fi
+
+FILES="$@"
+for FILE in $FILES; do
+ echo "${FILE}" | grep ".xml$" > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Skipping non-xml file: ${FILE}"
+ continue
+ fi
+
+ d=`dirname ${FILE}`
+ b=`basename ${FILE} .xml`
+
+ outfile="${b}.desktop"
+ echo "Creating: ${outfile}"
+ ${CMD} -o ${outfile} ${XSL} ${FILE}
+done
+
+ exit 0
diff --git a/xscreensaver-config.xsl b/xscreensaver-config.xsl
new file mode 100644
index 000000000000..089193b5237e
--- /dev/null
+++ b/xscreensaver-config.xsl
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+<xsl:output method="text" indent="no" />
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="screensaver">
+[Desktop Entry]
+Encoding=UTF-8
+Name=<xsl:value-of select="@_label" />
+Comment=<xsl:value-of select="normalize-space(_description)" />
+<xsl:if test="count(command/@name) != 0">
+TryExec=<xsl:value-of select="normalize-space(command/@name)" />
+Exec=<xsl:value-of select="normalize-space(command/@name)" /><xsl:text> </xsl:text><xsl:value-of select="normalize-space(command/@arg)" />
+</xsl:if>
+<xsl:if test="count(command/@name) = 0">
+TryExec=<xsl:value-of select="normalize-space(@name)" />
+Exec=<xsl:value-of select="normalize-space(@name)" /><xsl:text> </xsl:text><xsl:value-of select="normalize-space(command/@arg)" />
+</xsl:if>
+StartupNotify=false
+Terminal=false
+Type=Application
+Categories=Screensaver;
+OnlyShowIn=MATE;
+</xsl:template>
+
+</xsl:stylesheet>