Hello community,
here is the log from the commit of package opengl-games-utils for
openSUSE:Factory checked in at 2016-11-14 20:11:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opengl-games-utils (Old)
and /work/SRC/openSUSE:Factory/.opengl-games-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opengl-games-utils"
Changes:
--------
--- /work/SRC/openSUSE:Factory/opengl-games-utils/opengl-games-utils.changes
2012-05-07 22:48:42.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.opengl-games-utils.new/opengl-games-utils.changes
2016-11-14 20:11:32.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Jul 29 15:33:52 UTC 2016 - [email protected]
+
+- Ported to be compatible with POSIX-shell instead of bash.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ opengl-games-utils.spec ++++++
--- /var/tmp/diff_new_pack.FV4dZ2/_old 2016-11-14 20:11:33.000000000 +0100
+++ /var/tmp/diff_new_pack.FV4dZ2/_new 2016-11-14 20:11:33.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package opengl-games-utils
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,10 +26,10 @@
Source0: opengl-game-wrapper.sh
Source1: opengl-game-functions.sh
Source2: README
+Requires: %{_bindir}/glxinfo
+Requires: zenity
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
-Requires: /usr/bin/glxinfo
-Requires: zenity
%description
This package contains various shell scripts which are intended for use by
@@ -37,20 +37,18 @@
is available before launching an OpenGL game. This package is intended for use
by other packages and is not intended for direct end user use!
-
%prep
-%setup -c -T
+%setup -q -c -T
cp %{SOURCE2} .
%build
# nothing to build
%install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_bindir}
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
-install -p -m 755 %{SOURCE0} $RPM_BUILD_ROOT%{_bindir}
-install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_datadir}/%{name}
+install -p -m 755 %{SOURCE0} %{buildroot}%{_bindir}
+install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}
%files
%defattr(-,root,root,-)
++++++ opengl-game-functions.sh ++++++
--- /var/tmp/diff_new_pack.FV4dZ2/_old 2016-11-14 20:11:33.000000000 +0100
+++ /var/tmp/diff_new_pack.FV4dZ2/_new 2016-11-14 20:11:33.000000000 +0100
@@ -1,13 +1,12 @@
# check if DRI is available, show an error and exit if it isn't
-function checkDriOK ()
-{
- if [ `glxinfo | grep "direct rendering: " | head -n 1 | cut -d " " -f 3` !=
Yes ]; then
+checkDriOK() {
+ if ! glxinfo | grep -Fx "direct rendering: Yes" > /dev/null; then
zenity --error --text="Your system currently is not capable of hardware \
accelerated 3D. Therefore $1 cannot run.
Usually the cause of this error is that there are no Free Software drivers \
for your graphics card, please contact your graphics card manufacturer and \
kindly ask them to provide Free Software support for your card."
- exit 1;
+ return 1
fi
}
++++++ opengl-game-wrapper.sh ++++++
--- /var/tmp/diff_new_pack.FV4dZ2/_old 2016-11-14 20:11:33.000000000 +0100
+++ /var/tmp/diff_new_pack.FV4dZ2/_new 2016-11-14 20:11:33.000000000 +0100
@@ -1,9 +1,10 @@
-#!/bin/bash
+#!/bin/sh -e
. /usr/share/opengl-games-utils/opengl-game-functions.sh
-GAME=`basename $0 | sed 's/-wrapper.*//'`
+game=$(basename $0)
+game="${game%%-wrapper*}"
-checkDriOK $GAME
+checkDriOK "$game"
-exec $GAME "$@"
+exec "$game" "$@"