LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File x2goclient.spec of Package x2goclient (Project X11:RemoteDesktop:x2go)

# spec file for package x2goclient
# 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/

Name:           x2goclient
Release:        0
License:        GPL-2.0
Summary:        The X2go client and Mozilla plugin
Group:          Productivity/Networking/Remote Desktop
Url:            http://x2go.org/

#DL-URL:	http://code.x2go.org/releases/source/x2goclient/
#Git-Clone:	git://code.x2go.org/x2goclient
#Git-Web:	http://code.x2go.org/gitweb?p=x2goclient.git;a=summary
Source:         %name-%version.tar.gz
Source2:	%name-%version.tar.gz.asc
Source3:	%name-rpmlintrc
Patch1:		protos.diff
Patch2:		qt.diff

BuildRequires:  cups-devel gcc-c++ libqt4-devel >= 4.6.0
BuildRequires:	openldap2-devel
%if "%{?_vendor}" == "suse"
BuildRequires:	fdupes, update-desktop-files
%if 0%{?suse_version} >= 1130
BuildRequires:	pkgconfig(libssh) >= 0.4
BuildRequires:  pkgconfig(x11) pkgconfig(xpm) pkgconfig(xproto)
%if 0%{?suse_version} && 0%{?suse_version} < 1130
BuildRequires:	libssh-devel >= 0.4
BuildRequires:  xorg-x11-libXpm-devel xorg-x11-proto-devel
BuildRequires:  xorg-x11-libX11-devel

%if "%{?_vendor}" == "redhat"
BuildRequires:	libssh-devel >= 0.4
BuildRequires:	libXpm-devel, libX11-devel
BuildRequires:  man2html
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Requires:	nxproxy, terminus-font
%if "%{?_vendor}" == "suse"
Requires:	terminus-font
%if "%{?_vendor}" == "redhat"
Requires:	terminus-fonts
%if 0%{?suse_version} >= 1100
Suggests:	pinentry-x2go

This client will be able to connect to X2Go server(s) and start,
stop, resume and terminate (running) desktop sessions. X2Go Client
stores different server connections and may automatically request
authentication data from LDAP directories.

%if 0%{?__xz:1}
%setup -q
tar -xf "%{S:0}" --use=xz;
%setup -DTq
%patch -P 1 -P 2 -p1

mkdir pref;
for prog in $(which lrelease-qt4 lrelease 2>/dev/null); do
if [ -z "$prog" ]; then
	echo ERROR: lrelease not found
cat >"pref/lrelease" <<-EOF;
	exec "$prog" "\$@";
chmod a+x "pref/lrelease";
export PATH="$PWD/pref:$PATH";

mkdir build-bin;
for qmake in $(which qmake-qt4 qmake 2>/dev/null); do
cat >"build-bin/qmake" <<-EOF;
	exec "$qmake" QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags" "\$@";
chmod a+x build-bin/qmake;
# make calls qmake by qmake-qt4...
ln -s qmake build-bin/qmake-qt4;
export PATH="$PATH:$PWD/build-bin";

make %{?_smp_mflags};

make install DESTDIR="%buildroot" \
	PREFIX="%_prefix" MOZPLUGDIR="%_libdir/mozilla/plugins" \
	INSTALL_DIR="install -dm0755" \
	INSTALL_FILE="install -pm0644" \
	INSTALL_PROGRAM="install -pm0755"
%if 0%{?suse_version}
%suse_update_desktop_file -r x2goclient Utility WebUtility
%fdupes %buildroot