File adam.spec of Package adam
#
# spec file for package adam
#
# 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: adam
Version: 1.1.1
Release: 0
Summary: An open source shoot 'em up game
License: GPL-3.0-or-later
URL: https://gitlab.com/DavidLeonardWenzel/adam
Source0: https://gitlab.com/DavidLeonardWenzel/adam/-/archive/v%{version}/adam-v%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: ImageMagick
BuildRequires: update-desktop-files
Requires: love
Requires: lua53
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
BuildArch: noarch
%description
An open source shoot 'em up game.
%prep
%setup -q -n %{name}-v%{version}
rm -rf bin
%build
%install
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -rp assets src conf.lua main.lua %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_bindir}
echo -e "#!/bin/sh\n%{_bindir}/love %{_datadir}/%{name}" > %{buildroot}%{_bindir}/%{name}
chmod 0755 %{buildroot}%{_bindir}/%{name}
for i in 16 32 64 128; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/
convert dev/promotion/boss_title.png -resize ${i}x${i} %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done
%suse_update_desktop_file -c %{name} ADAM "Open source shoot 'em up" %{name} %{name} "Game;ArcadeGame;"
%fdupes -s %{buildroot}/%{_prefix}
%files
%license LICENSE.txt
%doc Attribution.txt README.MD
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%dir %{_datadir}/icons/hicolor/128x128
%dir %{_datadir}/icons/hicolor/128x128/apps
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%changelog