summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2013-08-02 10:39:30 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2013-08-02 10:39:30 +0200
commitc181f652e2abae583923a1a9b3d005e807a398f9 (patch)
tree290da22fb6727c56038ba6fe8982b28facc784c3 /redhat
parent3a724c41613a13ed023009fbf9ac747ca7a3e8f2 (diff)
downloadtde-packaging-c181f652e2abae583923a1a9b3d005e807a398f9.tar.gz
tde-packaging-c181f652e2abae583923a1a9b3d005e807a398f9.zip
RPM Packaging: update tdeartwork
Diffstat (limited to 'redhat')
-rw-r--r--redhat/tdeartwork/tdeartwork-14.0.0-fix_update_screensaver_list.patch57
-rw-r--r--redhat/tdeartwork/tdeartwork-14.0.0.spec48
2 files changed, 91 insertions, 14 deletions
diff --git a/redhat/tdeartwork/tdeartwork-14.0.0-fix_update_screensaver_list.patch b/redhat/tdeartwork/tdeartwork-14.0.0-fix_update_screensaver_list.patch
new file mode 100644
index 000000000..f75947350
--- /dev/null
+++ b/redhat/tdeartwork/tdeartwork-14.0.0-fix_update_screensaver_list.patch
@@ -0,0 +1,57 @@
+--- trinity-tdeartwork/tdescreensaver/kxsconfig/update_hacks.sh.ORI 2013-07-31 11:08:50.105439282 +0200
++++ trinity-tdeartwork/tdescreensaver/kxsconfig/update_hacks.sh 2013-07-31 11:22:06.146113235 +0200
+@@ -1,18 +1,50 @@
+ #!/bin/sh
+-scsvs=`cd /usr/lib/xscreensaver/ && ls -1 | grep -v config`
++
++# Checks for Xscreensaver directory (may vary on different distributions)
++if [ -d /usr/libexec/xscreensaver ]; then
++ XSDIR=/usr/libexec/xscreensaver
++elif [ -d /usr/lib64/xscreensaver ]; then
++ XSDIR=/usr/lib64/xscreensaver
++else
++ XSDIR=/usr/lib/xscreensaver
++fi
++
++# Gets list of screensavers. Exclude 'config'.
++scsvs=""
++pushd "${XSDIR}" >/dev/null
++for i in *; do
++ if [ "${i}" != "config" ]; then
++ scsvs="${scsvs} ${i}"
++ fi
++done
++popd >/dev/null
++
+ echo $scsvs
++
++# Removes useless .desktop files, if any
++for f in ScreenSavers/*.desktop; do
++ # Gets the command line for this screensaver
++ Exec="$(sed -n '/^Exec=kxsconfig / s/.* \(.*\)/\1/' $f)"
++ if [ ! -x "${XSDIR}/${Exec}" ]; then
++ echo "Removing ${f}"
++ rm -f "${f}"
++ fi
++done
++
++# Creates missing screensavers .desktop files
+ for name in $scsvs; do
+- if test -f /usr/lib/xscreensaver/$name && test -f /usr/share/xscreensaver/config/$name.xml && test ! -f ScreenSavers/$name.desktop; then
++ if test -f "${XSDIR}/$name" && test -f "/usr/share/xscreensaver/config/$name.xml" && test ! -f "ScreenSavers/$name.desktop"; then
+ echo "name: $name"
+ label=`grep '<screensaver.*_label' /usr/share/xscreensaver/config/$name.xml | sed -e 's#^.*_label=\"\(.*\)\".*$#\1#'`
+ echo "label: $label"
+ f=ScreenSavers/$name.desktop
+ sed -e "s#@NAME@#$name#; s#@LABEL@#$label#" ScreenSavers/xscreensaver.template > $f
+- if ldd /usr/lib/xscreensaver/$name 2>&1 | grep libGL; then
++ if ldd "${XSDIR}/$name" 2>&1 | grep libGL; then
+ sed -e "s,@GL1@,X-TDE-Category=OpenGL Screen Savers,; s,@GL2@,X-TDE-Type=OpenGL," $f > $f.new
+ else
+ grep -v @GL $f > $f.new
+ fi
+ mv $f.new $f
+ fi
+-done
++done
++
diff --git a/redhat/tdeartwork/tdeartwork-14.0.0.spec b/redhat/tdeartwork/tdeartwork-14.0.0.spec
index 79d1d153e..62d57b486 100644
--- a/redhat/tdeartwork/tdeartwork-14.0.0.spec
+++ b/redhat/tdeartwork/tdeartwork-14.0.0.spec
@@ -35,6 +35,7 @@ Url: http://www.trinitydesktop.org/
Source0: %{name}-%{version}%{?preversion:~%{preversion}}.tar.gz
+Patch1: tdeartwork-14.0.0-fix_update_screensaver_list.patch
BuildRequires: cmake >= 2.8
BuildRequires: trinity-tdelibs-devel >= %{tde_version}
@@ -56,11 +57,8 @@ BuildRequires: nas-devel
%endif
# LIBART support
-# On RHEL, libart is too old !
-%if 0%{?fedora} >= 15 || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?suse_version}
%define with_libart 1
-BuildRequires: libart_lgpl-devel
-%endif
+BuildRequires: trinity-libart-lgpl-devel
# XSCREENSAVER support
%if 0%{?fedora} >= 15 || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?rhel} >= 6 || 0%{?suse_version}
@@ -431,11 +429,6 @@ This package is part of Trinity, and a component of the TDE artwork module.
%{tde_datadir}/applnk/System/ScreenSavers/photopile.desktop
%{tde_datadir}/applnk/System/ScreenSavers/skytentacles.desktop
-# These screensavers do not exist on Mageia 2
-%if 0%{?mgaversion} == 0 && 0%{?mdkversion} == 0
-%{tde_datadir}/applnk/System/ScreenSavers/glmatrix.desktop
-%endif
-
##########
%if 0%{?with_webcollage}
@@ -622,17 +615,31 @@ This package is part of Trinity, and a component of the TDE artwork module.
%{tde_datadir}/applnk/System/ScreenSavers/xspirograph.desktop
%{tde_datadir}/applnk/System/ScreenSavers/zoom.desktop
-# These screensavers do not exist on OpenSuse 12.2
-%if 0%{?suse_version} == 0
+# These screensavers do not exist on OpenSuse
+%if 0%{?rhel} || 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion}
%{tde_datadir}/applnk/System/ScreenSavers/vidwhacker.desktop
%endif
-# These screensavers do not exist on Mageia 2 and Mandriva 2011
-%if 0%{?mgaversion} == 0 && 0%{?mdkversion} == 0
+# These screensavers do not exist on Mageia / Mandriva
+%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
+%{tde_datadir}/applnk/System/ScreenSavers/glmatrix.desktop
%{tde_datadir}/applnk/System/ScreenSavers/xjack.desktop
%{tde_datadir}/applnk/System/ScreenSavers/xmatrix.desktop
%endif
+%if 0%{?rhel} == 6
+%{tde_datadir}/applnk/System/ScreenSavers/rubikblocks.desktop
+%{tde_datadir}/applnk/System/ScreenSavers/surfaces.desktop
+%endif
+
+%if 0%{?mgaversion}
+%{tde_datadir}/applnk/System/ScreenSavers/companioncube.desktop
+%{tde_datadir}/applnk/System/ScreenSavers/hilbert.desktop
+%{tde_datadir}/applnk/System/ScreenSavers/rubikblocks.desktop
+%{tde_datadir}/applnk/System/ScreenSavers/surfaces.desktop
+%{tde_datadir}/applnk/System/ScreenSavers/tronbit.desktop
+%endif
+
%endif
##########
@@ -645,6 +652,12 @@ This package is part of Trinity, and a component of the TDE artwork module.
%prep
%setup -q -n %{name}-%{version}%{?preversion:~%{preversion}}
+%patch1 -p1 -b .screenlist
+
+# http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild
+# NOTE: Before building tdeartwork, install any and all xhack screensavers that might be uses, then:
+cd tdescreensaver/kxsconfig/
+./update_hacks.sh
%build
@@ -665,12 +678,19 @@ cd build
%endif
%cmake \
+ -DCMAKE_BUILD_TYPE="" \
+ -DCMAKE_C_FLAGS="-DNDEBUG" \
+ -DCMAKE_CXX_FLAGS="-DNDEBUG" \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DWITH_GCC_VISIBILITY=ON \
+ \
-DBIN_INSTALL_DIR=%{tde_bindir} \
-DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \
-DLIB_INSTALL_DIR=%{tde_libdir} \
-DSHARE_INSTALL_PREFIX=%{tde_datadir} \
- -DCMAKE_SKIP_RPATH="OFF" \
-DSHARE_INSTALL_PREFIX=%{tde_datadir} \
+ \
%{!?with_xscreensaver:-DWITH_XSCREENSAVER=OFF} \
%{!?with_libart}:-DWITH_LIBART=OFF} \
-DWITH_OPENGL=ON \