%global _hardened_build 1 %global commit0 480572054518112647c8fae5d7ea7046a6d6ecfb %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global debug_package %{nil} Summary: Apple IIgs Emulator Name: gsplus Version: 0.14git%{shortcommit0} Release: 5%{?dist} License: GPLv2 Group: Applications/Emulators URL: https://apple2.gs/plus/ Source0: https://github.com/digarok/gsplus/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz Source1: %{name}-getroms.sh Source4: %{name}.png Source5: %{name}.desktop Patch0: %{name}-xdg.patch Requires: xorg-x11-fonts-misc BuildRequires: gcc gcc-c++ BuildRequires: cmake BuildRequires: perl BuildRequires: re2c BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: freetype-devel BuildRequires: SDL2-devel BuildRequires: SDL2_image-devel BuildRequires: libpcap-devel BuildRequires: readline-devel %description gsplus is a portable (in the programming sense) Apple IIgs emulator, based on the KEGS cross-platform IIgs emulator by Kent Dickey. The base emulator builds and runs on all of the same platforms that KEGS did, and the new capabilities are being integrated as contributors have time and interest. %prep %autosetup -n %{name}-%{shortcommit0} -p1 %build mkdir build cd build cmake .. make %clean rm -rf $RPM_BUILD_ROOT %install install -d $RPM_BUILD_ROOT/%{_sysconfdir}/%{name} install -D -m 0755 build/bin/GSplus $RPM_BUILD_ROOT/%{_bindir}/%{name}.bin install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}/%{name}-getroms.sh install -D -m 0644 lib/NoBoot.po $RPM_BUILD_ROOT/%{_datadir}/%{name}/NoBoot.po install -D -m 0644 lib/letgothl.ttf $RPM_BUILD_ROOT/%{_datadir}/%{name}/lib/letgothl.ttf install -D -m 0644 %{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}.png # Initial config for clean boot. cat >$RPM_BUILD_ROOT/%{_datadir}/%{name}/config.txt.dist <$RPM_BUILD_ROOT/%{_bindir}/%{name} <<'EOF' #!/usr/bin/env bash # # Simple wrapper to start GSplus # First run, get roms if needed and setup config file. if [[ ! -f ${HOME}/.config/%{name}/config.txt && -n ${HOME} ]]; then /usr/bin/%{name}-getroms.sh fi cd %{_datadir}/%{name} exec %{_bindir}/%{name}.bin -audio 1 EOF desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE5} %files %defattr(-,root,root) %license LICENSE.txt %doc COPYRIGHT.txt README.md %attr(755,root,root) %{_bindir}/* %{_datadir}/%{name}/* %{_datadir}/applications/* %{_datadir}/pixmaps/* %changelog * Thu Jul 28 2022 Greg Wildman - 0.14git4805720-5 - Update to latest commit. - Remove pulseaudio dependency. * Wed Aug 29 2018 Greg Wildman - 0.14git6ebebfa-4 - Update to latest commit. * Mon Aug 27 2018 Greg Wildman - 0.14git712c079-3 - Update to latest commit. * Sat Aug 25 2018 Greg Wildman - 0.14git17f22c3-2 - Update to latest commit. * Thu Jun 28 2018 Greg Wildman - 0.13-11 - Patch for XDG folder compliance * Thu Jun 28 2018 Greg Wildman - 0.13-10 - Update config file detection * Sun Sep 25 2016 Greg Wildman - 0.31-7 - Include GUI .desktop file and appdata xml. * Sun Sep 25 2016 Greg Wildman - 0.31-6 - Include ROM01 as well. * Fri Dec 18 2015 Greg Wildman - 3.2-1 - Initial spec.