File x2godesktopsharing.spec of Package x2godesktopsharing

#
# spec file for package x2godesktopsharing
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           x2godesktopsharing
Version:        3.2.0.0
Release:        0
Summary:        Share x2go desktops with other users (via shadow sessions)
License:        GPL-2.0-or-later
Group:          Productivity/Networking/Remote Desktop
URL:            http://x2go.org/
#DL-URL:	http://code.x2go.org/releases/source/x2godesktopsharing/
#Git-Clone:	git://code.x2go.org/x2godesktopsharing
#Git-Web:	http://code.x2go.org/gitweb?p=x2godesktopsharing.git;a=summary
Source:         http://code.x2go.org/releases/source/x2godesktopsharing/%name-%version.tar.gz
Source2:        http://code.x2go.org/releases/source/x2godesktopsharing/%name-%version.tar.gz.asc
Source3:        %name-rpmlintrc
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libqt5-linguist
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-qtsvg-devel
Requires:       x2goserver >= 4.0.0.0
%if 0%{?suse_version}
Requires:       procps
%else
%if 0%{?el5} || 0%{?el6}
Requires:       sysvinit-tools
%else
Requires:       procps-ng
%endif
%endif

%description
x2godesktopsharing is a system tray tool that allows a user to
give/control access to his/her X/x2go session (via shadow session
support in NX libraries).

%prep
%setup -q

%build
%qmake5 STRIP=true
%make_build -j1

%install
%make_install
mkdir -p %buildroot/%_datadir/x2go/versions %buildroot/%_bindir
cp -a %name %buildroot/%_bindir/
cp -a share/* %buildroot/%_datadir/x2go/
cp -a VERSION.x2godesktopsharing %buildroot/%_datadir/x2go/versions/

mkdir -p %buildroot%_datadir/%name/icons
install -p -m 644 icons/%name.xpm %buildroot%_datadir/%name/icons/%name.xpm
mkdir -p %buildroot%_datadir/icons/hicolor/{16x16,32x32,64x64,128x128}/apps
install -p -m 644 icons/128x128/%name.png %buildroot%_datadir/icons/hicolor/128x128/apps/%name.png
install -p -m 644 icons/16x16/%name.png %buildroot%_datadir/icons/hicolor/16x16/apps/%name.png
install -p -m 644 icons/64x64/%name.png %buildroot%_datadir/icons/hicolor/64x64/apps/%name.png
install -p -m 644 icons/32x32/%name.png %buildroot%_datadir/icons/hicolor/32x32/apps/%name.png

mkdir -p %buildroot/%_mandir/man1 %buildroot/%_mandir/man8
cp -a man/man1/*.1 %buildroot%_mandir/man1/
desktop-file-install --dir %buildroot%_datadir/applications %name.desktop

%pre
# Needed for sharing a desktop with another user
getent group x2godesktopsharing >/dev/null || groupadd -r x2godesktopsharing

%files
%dir %_datadir/x2godesktopsharing
%dir %_datadir/x2godesktopsharing/icons
%_bindir/x2go*
%_datadir/x2go
%_mandir/man*/x2go*
%_datadir/applications/x2godesktopsharing.desktop
%_datadir/icons/hicolor/*/apps/x2godesktopsharing.png
%_datadir/x2godesktopsharing/icons/x2godesktopsharing.xpm

%changelog
openSUSE Build Service is sponsored by