File grub-invaders.spec of Package grub-invaders

#
# spec file for package grub-invaders
#
# Copyright (c) 2021 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:           grub-invaders
Version:        1.0.0
Release:        0
Summary:        Multi boot compliant kernel game
License:        GPL-2.0
Group:          System/Boot
URL:            http://www.erikyyy.de/invaders/
Source0:        http://www.erikyyy.de/invaders/invaders-%{version}.tar.gz
Source1:        %{name}-extra.tar.xz
Source2:        %{name}.changes
Source3:        %{name}-rpmlintrc
#!BuildIgnore:  gcc-PIE
BuildRequires:  update-bootloader-rpm-macros
%{?update_bootloader_requires}
Provides:       lilo:/boot/invaders
Suggests:       qemu-x86
Supplements:    grub2
ExclusiveArch:  %{ix86} x86_64

%description
GRUB Invaders is a game that runs directly on a computer, without an operating
system. It is meant to be started with the GRUB bootloader for PCs.

%prep
%setup -q -n invaders -a 1

# Apply patches from Debian
extra/apply-patches extra/patches/series .

# Fix linker script directory
sed -i 's|debian/invaders.ld|extra/invaders.ld|' compile.sh

%build
./compile.sh

%install
# Binary
install -Dpm 0644 invaders %{buildroot}/boot/invaders
# Script to generate GRUB Invaders menu entry
install -Dpm 0755 extra/scripts/22_invaders %{buildroot}%{_sysconfdir}/grub.d/22_invaders

%post
%update_bootloader_check_type_refresh_post grub2

%postun
%update_bootloader_check_type_refresh_post grub2

%posttrans
%update_bootloader_posttrans

%files
%license GPL
%doc README
/boot/invaders
%dir %{_sysconfdir}/grub.d
%config(noreplace) %{_sysconfdir}/grub.d/22_invaders

%changelog
openSUSE Build Service is sponsored by