|
| 1 | +Name: gearboy |
| 2 | +Version: %{?version}%{!?version:1.0.0} |
| 3 | +Release: 1%{?dist} |
| 4 | +Summary: Game Boy / Game Boy Color emulator |
| 5 | + |
| 6 | +License: GPL-3.0-or-later |
| 7 | +URL: https://github.com/drhelius/Gearboy |
| 8 | +Source0: https://github.com/drhelius/Gearboy/archive/refs/tags/%{version}.tar.gz |
| 9 | + |
| 10 | +BuildRequires: gcc-c++ |
| 11 | +BuildRequires: gcc |
| 12 | +BuildRequires: make |
| 13 | +BuildRequires: pkgconf-pkg-config |
| 14 | +BuildRequires: mesa-libGL-devel |
| 15 | +BuildRequires: SDL3-devel |
| 16 | + |
| 17 | +Requires: mesa-libGL |
| 18 | +Requires: SDL3 |
| 19 | + |
| 20 | +%description |
| 21 | +Gearboy is a cross-platform Game Boy / Game Boy Color emulator |
| 22 | +written in C++. |
| 23 | + |
| 24 | +%prep |
| 25 | +%autosetup -n Gearboy-%{version} |
| 26 | + |
| 27 | +%build |
| 28 | +%make_build -C platforms/linux \ |
| 29 | + GIT_VERSION="%{version}" \ |
| 30 | + USE_CLANG=0 \ |
| 31 | + DEBUG=0 |
| 32 | + |
| 33 | +%install |
| 34 | +install -Dm755 platforms/linux/%{name} %{buildroot}%{_prefix}/lib/%{name}/%{name} |
| 35 | +ln -s %{_prefix}/lib/%{name}/%{name} %{buildroot}%{_bindir}/%{name} |
| 36 | + |
| 37 | +install -Dm644 platforms/shared/gamecontrollerdb.txt %{buildroot}%{_prefix}/lib/%{name}/gamecontrollerdb.txt |
| 38 | + |
| 39 | +install -dm755 %{buildroot}%{_prefix}/lib/%{name}/mcp/resources/hardware |
| 40 | +install -Dm644 platforms/shared/desktop/mcp/resources/hardware/toc.json %{buildroot}%{_prefix}/lib/%{name}/mcp/resources/hardware/toc.json |
| 41 | + |
| 42 | +install -Dm644 platforms/linux/debian/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop |
| 43 | +sed -i 's|/usr/games/gearboy|gearboy|g' %{buildroot}%{_datadir}/applications/%{name}.desktop |
| 44 | + |
| 45 | +install -Dm644 platforms/shared/desktop/mcp/icon.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png |
| 46 | + |
| 47 | +install -Dm644 platforms/linux/debian/%{name}.6 %{buildroot}%{_mandir}/man6/%{name}.6 |
| 48 | + |
| 49 | +%files |
| 50 | +%license LICENSE |
| 51 | +%doc README.md |
| 52 | +%{_bindir}/%{name} |
| 53 | +%{_prefix}/lib/%{name}/ |
| 54 | +%{_datadir}/applications/%{name}.desktop |
| 55 | +%{_datadir}/icons/hicolor/128x128/apps/%{name}.png |
| 56 | +%{_mandir}/man6/%{name}.6* |
| 57 | + |
| 58 | +%changelog |
| 59 | +* %(date "+%a %b %d %Y") Nacho Sanchez <863613+drhelius@users.noreply.github.com> - %{version}-1 |
| 60 | +- Release %{version} |
0 commit comments