A new user interface for you!

File electricsheep.spec of Package electricsheep

# spec file for package electricsheep
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Summary:  Screensaver showing collective dream of sleeping computers
Name:     electricsheep
Version:  0
Release:  0
License:  GPL-2.0+
Group:    Amusements/Toys/Screensavers
Source:   %{name}-%{version}.tar.xz
# see http://code.google.com/p/electricsheep/issues/detail?id=11
#+ passing define option to compiler, instead
# Patch:    %%{name}-ContentDecoder.patch
# pkg-config exposes lua instead of lua5.1
Patch2:   %{name}-configure.patch
# for kde desktop file
Patch3:   %{name}-Makefile.patch
URL:      http://electricsheep.org
Requires:       curl flam3
Requires:       kdebase4-workspace
BuildRequires:  kdebase4-workspace
Recommends:     xli xscreensaver gnome-screensaver
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  fdupes
%if 0%{?suse_version} <= 1210
# Only needed for openSUSE <= 12.1; later it is pulled in by rpm-build.
BuildRequires:  xz
BuildRequires:  xorg-x11-devel libexpat-devel libpng-devel libjpeg-devel
BuildRequires:  wxWidgets-devel > 2.9.1 pkgconfig libtool autoconf automake
BuildRequires:  make gcc gcc-c++ libffmpeg-devel flam3-devel
BuildRequires:  libgtop-devel tinyxml-devel freeglut-devel libGLee-devel
BuildRequires:  boost-devel >= 1.41 libcurl-devel xorg-x11-libXrender-devel
%if 0%{?suse_version} <= 1210
# Only needed for openSUSE <= 12.1; lua51 was default there
BuildRequires:  lua-devel
# For openSUSE >= 12.2 since lua52 is default
BuildRequires:  lua51-devel
%if 0%{?suse_version} > 1210
BuildRequires:  libX11-devel
# libavutil-devel provided by libffmpeg-devel
# BuildRequires: libavutil-devel
BuildRoot:     %{_tmppath}/%{name}-%{version}-build

Electric sheep is the collective dream of sleeping computers
from all over the internet. Less poetically, it is an Internet server and
xscreensaver module that displays MPEG video of an animated fractal flame.
In the background, it contributes render cycles to the next animation.
Periodically, it uploads completed frames to the server, where they are
compressed for distribution to all clients.

%setup -q -n %{name}-%{version}/client_generic
%patch3 -p1
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" Client/client.h
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" Client/client.h

#I am in debt with Arch Linux folks
%__sed -i -e 's/AM_PROG_CC_STDC/AC_PROG_CC/' configure.ac
%__sed -i '12 i#include <cstdio>' Common/Singleton.h
#was compile-blocking (thanks ArchL.)
%__sed -i '\|-I /usr/include/libavutil|d;28s| \\$||' MSVC/SettingsGUI/Makefile.am
%__sed -i 's|docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)|docdir = $(prefix)/share/doc/packages/$(PACKAGE)|' Makefile.am
%__mkdir -p m4
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%{__make} %{?_smp_mflags} VERBOSE=1

%__sed -i '$aIcon=%{name}' %{buildroot}%{_datadir}/applications/ElectricSheep.desktop
%suse_update_desktop_file -r -G "Screensaver showing collective dream of sleeping computers" ElectricSheep Utility DesktopUtility
%__sed -i '1i#! /bin/bash\n' %{buildroot}%{_bindir}/electricsheep-saver
%__sed -i '$aOnlyShowIn=GNOME;' %{buildroot}%{_datadir}/applications/screensavers/electricsheep.desktop
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/screensavers/electricsheep.desktop GNOME GTK Screensaver
%fdupes %{buildroot}%{_datadir}



%defattr(-, root, root)