File lix.spec of Package lix

#
# spec file for package lix
#
# Copyright (c) 2020 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:           lix
Version:        0.9.33
Release:        0
Summary:        Action-puzzle game inspired by Lemmings
License:        CC0-1.0
Group:          Amusements/Games/Other
URL:            http://www.lixgame.com/
Source:         https://github.com/SimonN/LixD/archive/v%{version}.tar.gz#/LixD-%{version}.tar.gz
Source1:        deps.tar.gz
Source2:        http://www.lixgame.com/dow/lix-music.zip
BuildRequires:  dmd
BuildRequires:  dub
BuildRequires:  enet-devel
BuildRequires:  fdupes
BuildRequires:  git-core
BuildRequires:  hicolor-icon-theme
BuildRequires:  ldc
BuildRequires:  phobos-devel
BuildRequires:  phobos-devel-static
BuildRequires:  pkgconfig
BuildRequires:  unzip
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(allegro-5)
BuildRequires:  pkgconfig(allegro_acodec-5)
BuildRequires:  pkgconfig(allegro_font-5)
BuildRequires:  pkgconfig(allegro_image-5)
BuildRequires:  pkgconfig(allegro_primitives-5)
BuildRequires:  pkgconfig(allegro_ttf-5)

%description
Lix is a multiplayer action puzzle game. It comes with a level editor
and also a singleplayer puzzle mode.

%prep
%setup -q -n LixD-%{version}
tar xxvf %{SOURCE1}
unzip %{SOURCE2}
sed -i 's/\r$//' doc/*.txt

%build
export dlang_deps_path=$(pwd)/deps
dub add-path "$dlang_deps_path"
dub build --cache=local --parallel --force --build=releaseXDG
dub remove-path "$dlang_deps_path"
dub clean-caches

%install
install -Dm755 bin/lix %{buildroot}%{_bindir}/lix
install -d %{buildroot}%{_datadir}/lix
cp -ar data/ images/ levels/ music/ %{buildroot}%{_datadir}/lix
install -Dm644 doc/lix.6 %{buildroot}%{_mandir}/man6/lix.6
install -Dm644 data/images/lix_logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%suse_update_desktop_file -c %{name} 'Lix' 'An action-puzzle game inspired by Lemmings' %{name} %{name} Game ActionGame
%fdupes -s %{buildroot}/%{_datadir}

%files
%license doc/copying.txt
%doc doc/cmdargs.txt doc/history.txt doc/levmaint.txt doc/thanks.txt
%{_bindir}/lix
%{_datadir}/lix
%{_datadir}/icons/hicolor/scalable/apps/lix.svg
%{_datadir}/applications/lix.desktop
%{_mandir}/man6/lix.6%{?ext_man}

%changelog