File jsoko.spec of Package jsoko

#
# spec file for package jsoko
#
# Copyright (c) 2022 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:           jsoko
Version:        2.02
Release:        0
Summary:        The Sokoban game implemented in Java
License:        GPL-3.0-only
Group:          Amusements/Games/Board/Puzzle
URL:            https://www.sokoban-online.de/
Source:         http://downloads.sourceforge.net/project/jsokoapplet/JSoko/Version%20%{version}/JSoko_%{version}-src.zip
BuildRequires:  ant
BuildRequires:  java-devel-openjdk
BuildRequires:  lua
BuildRequires:  unzip
BuildRequires:  xml-commons-apis
BuildRequires:  fdupes
Requires:       jre
BuildArch:      noarch

%description
JSoko is a Java program for playing the Sokoban game. It features path finding,
auto push, auto solving, undo/redo, deadlock detection, and more.

%prep
%setup -q -c

%build
%{ant}

%install
cat > %{name} <<EOF
#!/usr/bin/sh
cd %{_datadir}/%{name}
java -jar JSoko.jar
EOF
install -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
install -d %{buildroot}%{_datadir}/%{name}
cp -a JSoko_%{version}/* %{buildroot}%{_datadir}/%{name}
%fdupes %{buildroot}%{_datadir}/%{name}

%files
%{_bindir}/%{name}
%{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by