File x2gothinclient.spec of Package x2gothinclient

#
# spec file for package x2gothinclient
#
# 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:           x2gothinclient
Summary:        Login daemon starting x2goclient in displaymanager mode
Version:        1.0.1.8
Release:        0
License:        GPL-2.0+
Group:          Productivity/Networking/Remote Desktop
Url:            http://x2go.org/

#DL-URL:	http://code.x2go.org/releases/source/x2gothinclient/
#Git-Clone:	git://code.x2go.org/x2gothinclient
#Git-Web:	http://code.x2go.org/gitweb?p=x2gothinclient.git;a=summary
Source:		http://code.x2go.org/releases/source/%name/%name-%version.tar.gz
Source2:	http://code.x2go.org/releases/source/%name/%name-%version.tar.gz.asc
Source3:	%name.keyring
Source4:	%name-rpmlintrc

BuildRequires:	gcc-c++, libqt4-devel >= 4.6, qmake
%if 0%{?suse_version} >= 1230
BuildRequires:	gpg-offline
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# killall, sleep, su, Xorg
Requires:	coreutils, perl(IPC::Open3), psmisc
Requires:	x2goclient >= 3.99.1.1
%if 0%{?suse_version} >= 1100
# The others do not understand Recommends
Recommends:	gpg2, pinentry-x2go
Recommends:	x2gocdmanager, x2gousbmount, x2gosmartcardrules
%endif
%if 0%{?suse_version} >= 1220
Requires:	xauth, xinit
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1220
Requires:	xorg-x11-xauth, xorg-x11
%endif
%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?redhat_version}
Requires:	xorg-x11-xauth, xorg-x11-xinit
%endif
Obsoletes:	x2gothinshutdown

%description
X2go is a server based computing environment with
   - session resuming
   - low bandwith support
   - LDAP support
   - client side mass storage mounting support
   - audio support
   - authentication by smartcard and USB stick

Use the "x2gothinclient" package only for the X2go Thin Client
environment. (This package is meant to be installed in a chroot
environment.)

This package starts x2goclient in fullscreen mode--without window
decorations, without menu and toolbar, and optionally with enabled
LDAP support. The package ships the core X2go thin client daemon that
guards over x2goclient functionality.

x2goclient will behave like xdm, kdm or gdm on X2go thin clients.

%package -n x2gocdmanager
Summary:	X2go client-side daemon enabling automatic CD-ROM mounting
Group:          Productivity/Networking/Remote Desktop
# killall->psmisc, mount
Requires:	eject, lsscsi, psmisc, util-linux

%description -n x2gocdmanager
Use the "x2gocdmanager" package only for the X2go Thin Client
environment. (This package is meant to be installed in a chroot
environment.)

This package adds a client-side daemon to your X2go thin client that
enables automatic CD-ROM mounting within thin client X2go sessions.

%package -n x2gosmartcardrules
Summary:	X2go udev rules for smartcard readers
Group:          Productivity/Networking/Remote Desktop
Requires:	coreutils, sed, udev

%description -n x2gosmartcardrules
Use the "x2gosmartcardrules" package only for the x2go Thin Client
environment. (This package is meant to be installed in a chroot
environment.)

This package provides udev rules for smartcard readers (devices that
serve the purpose of ID card-based authentication).

%package -n x2gothinclientmanagement
Summary:	Management tools for X2go thin client chroot server
Group:          Productivity/Networking/Remote Desktop
# x2gothinclient_create: debootstrap wtf? patch, pwdutils
Requires:	coreutils
%if 0%{?suse_version} >= 1100
Recommends:	nfs-kernel-server, syslinux, tftp
Suggests:	dhcp-server
%endif

%description -n x2gothinclientmanagement
Install the "x2gothinclientmanagement" package on the chroot server
that provides X2go thin client images over PXE/Etherboot.

For chroot servers, a very separate machine that only serves this
purpose is recommended.

%package -n x2gousbmount
Summary:	Client-side USB mass storage device mounting for X2go
Group:          Productivity/Networking/Remote Desktop
Requires:	cryptsetup, coreutils, udev, util-linux

%description -n x2gousbmount
Use the "x2gousbmount" package only for the X2go Thin Client
environment. (This package is meant to be installed in a chroot
environment.)

This package adds client-side USB mass storage device mounting using
udev rules to your X2go thin client.

%prep
%{?gpg_verify: %gpg_verify %{S:2}}
%setup -q

%build
pushd x2gocdmanager/powerej/;
qmake QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
make %{?_smp_mflags};
popd;

%install
b="%buildroot";

pushd x2gocdmanager/;
mkdir -p "$b/%_bindir" "$b/%_sbindir" "$b/%_mandir"/man{1,8};
install -pm0755 "powerej/x2goejectcd" "$b/%_bindir/";
install -pm0755 "x2gocdmanager" "$b/%_sbindir/";
install -pm0644 man/*.1 "$b/%_mandir/man1/";
install -pm0644 man/*.8 "$b/%_mandir/man8/";
popd;

pushd x2gosmartcardrules/;
mkdir -p "$b/lib/udev/rules.d" "$b/%_libexecdir/x2go/tce";
mkdir -p "$b/%_mandir/man8";
install -pm0644 *.rules "$b/lib/udev/rules.d/";
install -pm0755 x2gognupgccid "$b/%_libexecdir/x2go/tce/";
install -pm0644 man/*.8 "$b/%_mandir/man8/";
popd;

pushd x2gothinclient/;
mkdir -p "$b/%_sbindir" "$b/%_mandir/man8";
install -pm0755 sbin/x2gothinclientd "$b/%_sbindir/";
install -pm0644 man/*.8 "$b/%_mandir/man8/";
popd;

pushd x2gothinclientmanagement/;
mkdir -p "$b/%_sbindir" "$b/%_sysconfdir/x2go" "$b/%_datadir/x2go/tce";
mkdir -p "$b/%_mandir/man8";
install -pm0755 sbin/x2gothinclient_* "$b/%_sbindir/";
install -pm0644 etc/x2gothinclient_* "$b/%_sysconfdir/x2go/";
install -pm0644 share/x2gothinclient_* "$b/%_datadir/x2go/tce/";
install -pm0644 man/*.8 "$b/%_mandir/man8/";
cp -a share/tftpboot "$b/%_datadir/x2go/tce/";
popd;

pushd x2gousbmount/;
mkdir -p "$b/%_mandir/man8" "$b/lib/udev/rules.d" "$b/%_libexecdir/x2go/tce";
install -pm0644 61-x2gousbmount.rules "$b/lib/udev/rules.d/";
install -pm0755 x2gousbmount "$b/%_libexecdir/x2go/tce/";
install -pm0644 man/*.8 "$b/%_mandir/man8/";
popd;

%files
%defattr(-,root,root)
%_sbindir/x2gothinclientd
%_mandir/man8/x2gothinclientd.8*

%files -n x2gocdmanager
%defattr(-,root,root)
%_bindir/x2goejectcd
%_sbindir/x2gocdmanager
%_mandir/man1/x2goejectcd.1*
%_mandir/man8/x2gocdmanager.8*

%files -n x2gosmartcardrules
%defattr(-,root,root)
%dir /lib/udev
%dir /lib/udev/rules.d
/lib/udev/rules.d/21-x2gognupgccid.rules
%dir %_libexecdir/x2go
%dir %_libexecdir/x2go/tce
%_libexecdir/x2go/tce/x2gognupgccid
%_mandir/man8/x2gognupgccid.8*

%files -n x2gothinclientmanagement
%defattr(-,root,root)
%_sbindir/x2gothinclient_*
%dir %_sysconfdir/x2go
%config(noreplace) %_sysconfdir/x2go/x2gothinclient_*
%dir %_datadir/x2go
%dir %_datadir/x2go/tce
%_datadir/x2go/tce/x2gothinclient_*
%_datadir/x2go/tce/tftpboot
%doc x2gothinclientmanagement/README
%_mandir/man8/x2gothinclient_*.8*

%files -n x2gousbmount
%defattr(-,root,root)
%dir /lib/udev
%dir /lib/udev/rules.d
/lib/udev/rules.d/61-x2gousbmount.rules
%dir %_libexecdir/x2go
%dir %_libexecdir/x2go/tce
%_libexecdir/x2go/tce/x2gousbmount
%_mandir/man8/x2gousbmount.8*

%changelog
openSUSE Build Service is sponsored by