File PlayOnLinux.spec of Package PlayOnLinux

#
# spec file for package PlayOnLinux
#
# Copyright (c) 2013 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:           PlayOnLinux
Version:        4.2.1
Release:        0
Summary:        Play your Windows games on Linux
License:        GPL-3.0
Group:          Amusements/Games/Other
Url:            http://www.playonlinux.com
Source0:        http://www.playonlinux.com/script_files/PlayOnLinux/%{version}/%{name}_%{version}.tar.gz
Source1:        playonlinux.sh
# PATCH-FIX-OPENSUSE PlayOnLinux-desktop.patch
Patch0:         %{name}-desktop.patch
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
%endif
BuildRequires:  python-devel
Requires:       ImageMagick
Requires:       dbus-1-python
Requires:       gettext
Requires:       icoutils
Requires:       python
Requires:       python-gtk >= 2.8
Requires:       python-wxGTK
Requires:       unzip
Requires:       wget
Requires:       wine
Requires:       xterm
Recommends:     python-gnome-extras
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%{py_requires}

%description
PlayOnLinux is able to install Windows
games on your Linux Distro.

For Plugins, check here: http://www.playonlinux.com/en/download.html

%prep
%setup -q -n playonlinux
%patch0

%build
# no build needed

%install
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/desktop-directories
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/pixmaps
tar -xvzf %{SOURCE0} -C %{buildroot}%{_datadir}
chmod +x %{buildroot}%{_datadir}/playonlinux/bash/read_pc_cd
chmod +x %{buildroot}%{_datadir}/playonlinux/python/lib/irc.py
chmod +x %{buildroot}%{_datadir}/playonlinux/python/gui_server.py
chmod +x %{buildroot}%{_datadir}/playonlinux/bash/startup_after_server
install -p %{SOURCE1} %{buildroot}%{_bindir}/playonlinux
rm %{buildroot}%{_datadir}/playonlinux/LICENCE
rm %{buildroot}%{_datadir}/playonlinux/CHANGELOG
cp etc/PlayOnLinux.desktop %{buildroot}%{_datadir}/applications/PlayOnLinux.desktop
cp  %{buildroot}%{_datadir}/playonlinux/etc/playonlinux.png %{buildroot}%{_datadir}/pixmaps/playonlinux.png
cp %{buildroot}%{_datadir}/playonlinux/etc/PlayOnLinux.directory %{buildroot}%{_datadir}/desktop-directories/PlayOnLinux.directory
%if 0%{?suse_version}
%suse_update_desktop_file -i -n -r -G 'PlayOnLinux-Emulator' %{name} System Emulator
%fdupes %{buildroot}%{_datadir}
%endif

%files  
%defattr(-,root,root)
%doc LICENCE CHANGELOG
%{_bindir}/playonlinux
%dir %{_datadir}/playonlinux
%dir %{_datadir}/desktop-directories
%{_datadir}/playonlinux/*
%{_datadir}/applications/PlayOnLinux.desktop
%{_datadir}/pixmaps/playonlinux.png
%{_datadir}/desktop-directories/PlayOnLinux.directory

%changelog