File libidodeum.spec of Package libidodeum

#
# spec file for package libidodeum
#
# Copyright (c) 2018 Vincenzo Sinisi
#
# 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:           libidodeum
Version:        1.1
Release:        0
Summary:        A tool for Arkham Horror board game setup
License:        GPL-3.0+
Group:          Amusements/Games/Board/Other
Url:            https://build.opensuse.org/package/show/home:svenzo:LibidoDeum/libidodeum
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}.desktop
BuildRequires:  update-desktop-files
Requires:       python3
Requires:       python-qt5
Requires:		python-qt5-utils
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%description
Libido Deum is a tool that allows you to randomly extracts detectives and Great 
Ancients for Arkham Horror board game setup.

%prep
%setup -q -n %{name}

%build

%install
install -D -m 0755 libidodeum %{buildroot}/%{_bindir}/libidodeum
install -D -m 0755 libidodeum.py %{buildroot}/%{_datadir}/%{name}/libidodeum.py
install -D -m 0755 libidodeum_gui.py %{buildroot}/%{_datadir}/%{name}/libidodeum_gui.py
install -D -m 0755 libidodeum_gui.ui %{buildroot}/%{_datadir}/%{name}/libidodeum_gui.ui
install -D -m 0755 LICENSE.txt %{buildroot}/%{_datadir}/%{name}/LICENSE.txt
install -D -m 0755 libidodeum.png %{buildroot}/%{_datadir}/icons/libidodeum.png
install -D -m 0755 %{SOURCE1} %{buildroot}/%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}

%files
%defattr(-,root,root,0755)
%{_bindir}/libidodeum
%{_datadir}/%{name}/libidodeum.py
%{_datadir}/%{name}/libidodeum_gui.py
%{_datadir}/%{name}/libidodeum_gui.ui
%{_datadir}/%{name}/LICENSE.txt
%{_datadir}/icons/libidodeum.png
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/%{name}

%changelog