File openxenmanager.spec of Package OpenXenManager
#
# spec file for package openxenmanager
#
# Copyright (c) 2017 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
# 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: openxenmanager
Version: 0.1b1
Release: 0
Summary: Client Application to Connect to the Citrix XenServer Host
License: GPL-2.0+
Group: System/Monitoring
Url: http://github.com/OpenXenManager/openxenmanager
Source: %{name}-%{version}.tar.xz
BuildRequires: update-desktop-files
BuildRequires: fdupes
BuildRequires: findutils
BuildRequires: python
BuildRequires: gtk2 >= 2.16.0
BuildRequires: python-setuptools
Requires: python-gtk-vnc
Requires: python-gtk
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArchitectures: noarch
%description
OpenXenManager (aka OpenXenCenter) is a client application to connect to the Citrix XenServer Host through the network. OpenXenManager is written in python with
pygtk and a and gtk-vnc (or vncviewer). You can monitor your virtual machines, access virtual machine consoles, perform allowed operations (start, stop, suspend,
reboot...), create virtual machines, and more.
%prep
%setup -q
%build
python setup.py build
#remove shebang from all non executable files
find ./ -type f -name "*.py" -perm 644 -exec sed -i -e '1{\@^#!/usr/bin/env python@d}' {} \;
find ./ -type f -name "*.py" -perm 644 -exec sed -i -e '1{\@^#!/usr/bin/python@d}' {} \;
%install
python setup.py install --single-version-externally-managed -O2 --root=%{buildroot} --record=INSTALLED_FILES
#Add .desktop icons
mv desktop_and_icons/icons %{buildroot}%{python_sitelib}/OXM/
mkdir -p %{buildroot}%{_datarootdir}/pixmaps
ln -s %{python_sitelib}/OXM/icons/128x128/xen.png %{buildroot}%{_datarootdir}/pixmaps/%{name}.png
#hardlink duplicated files
%fdupes %{buildroot}%{python_sitelib}
#Add .desktop file
%suse_update_desktop_file -c %{name} OpenXenManager "Client Application to Connect to the Citrix XenServer Host" %{name} %{name} System Monitor GTK
%files -f INSTALLED_FILES
%defattr(-,root,root)
%dir %{python_sitelib}/OXM
%dir %{python_sitelib}/OXM/images
%dir %{python_sitelib}/OXM/images/menu
%dir %{python_sitelib}/OXM/images_map
%dir %{python_sitelib}/OXM/ui
%dir %{python_sitelib}/%{name}-%{version}-py2.7.egg-info
%dir %{python_sitelib}/pygtk_chart
%dir %{python_sitelib}/pygtk_chart/data
%{python_sitelib}/OXM/icons
%{_datarootdir}/applications/%{name}.desktop
%{_datarootdir}/pixmaps/%{name}.png
%changelog