File PlayOnLinux.spec of Package PlayOnLinux

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

Name:           PlayOnLinux
%define _name   playonlinux
Version:        4.2.12
Release:        0
Summary:        Play your Windows games on GNU/Linux
License:        GPL-3.0
Group:          Amusements/Games/Other
# PATCH-FIX-OPENSUSE PlayOnLinux-desktop.patch
Patch0:         %{name}-desktop.patch
# PATCH-FIX-OPENSUSE PlayOnLinux-https.patch: Fix unencrypted connection to
Patch10:        %{name}-https.patch
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
Requires:       ImageMagick
Requires:       dbus-1-python
Requires:       gettext
Requires:       icoutils
Requires:       p7zip
Requires:       python
Requires:       python-gtk >= 2.8
Requires:       python-wxGTK
Requires:       unzip
Requires:       wget
Requires:       wine
Requires:       xterm
Recommends:     python-gnome-extras
BuildArch:      noarch

PlayOnLinux is a piece of software which allows you to easily install and use
numerous games and apps designed to run with Microsoft Windows.
Few games are compatible with GNU/Linux at the moment and it certainly is
a factor preventing the migration to this system.
PlayOnLinux brings a cost-free, accessible and efficient solution to this problem.

%setup -q -n %{_name}
%patch0 -p1
%patch10 -p1

# Nothing to build.

install -Dm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_name}

mkdir -p %{buildroot}%{_datadir}/%{_name}/
cp -rf * %{buildroot}%{_datadir}/%{_name}/

# Remove unneeded files.
rm -f %{buildroot}%{_datadir}/%{_name}/{,,LICENCE,TRANSLATORS,python/}
rm -rf %{buildroot}%{_datadir}/%{_name}/src

for f in bash/read_pc_cd bash/find_python bash/startup_after_server python/ \
  tests/bash/test-versionlower tests/python/; do
    chmod +x "%{buildroot}%{_datadir}/%{_name}/$f"

install -Dm 0644 etc/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm 0644 %{buildroot}%{_datadir}/%{_name}/etc/%{_name}.png %{buildroot}%{_datadir}/pixmaps/%{_name}.png
install -Dm 0644 %{buildroot}%{_datadir}/%{_name}/etc/%{name}.directory %{buildroot}%{_datadir}/desktop-directories/%{name}.directory

%suse_update_desktop_file %{name}
%fdupes %{buildroot}%{_datadir}
%find_lang pol

%files -f pol.lang
%dir %{_datadir}/desktop-directories