File lix.spec of Package lix

#
# spec file for package lix
#
# Copyright (c) 2025 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.10.29
Release:        0
Summary:        Action-puzzle game inspired by Lemmings
License:        CC0-1.0
Group:          Amusements/Games/Other
URL:            https://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
Source3:        create-dependencies.sh
BuildRequires:  dmd >= 2.094
BuildRequires:  dub
BuildRequires:  enet-devel
BuildRequires:  fdupes
BuildRequires:  git-core
BuildRequires:  hicolor-icon-theme
#
BuildRequires:  ldc
BuildRequires:  ldc-runtime-devel
#
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 --compiler=dmd --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
install -Dm644 data/images/lix_logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/com.lixgame.Lix.svg
install -Dm644 data/desktop/com.lixgame.Lix.metainfo.xml %{buildroot}%{_datadir}/metainfo/org.corectrl.corectrl.appdata.xml
install -Dm644 data/desktop/com.lixgame.Lix.desktop %{buildroot}%{_datadir}/applications/com.lixgame.Lix.desktop
%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}/icons/hicolor/scalable/apps/com.lixgame.Lix.svg
%{_datadir}/applications/com.lixgame.Lix.desktop
%{_datadir}/metainfo/org.corectrl.corectrl.appdata.xml
%{_mandir}/man6/lix.6%{?ext_man}

%changelog
openSUSE Build Service is sponsored by