%global debug_package %{nil} Summary: Apple IIgs Emulator Name: gsport Version: 0.31 Release: 15%{?dist} License: GPLv2 Group: Applications/Emulators URL: https://github.com/david-schmidt/gsport Source0: https://github.com/david-schmidt/gsport/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}-getroms.sh Source3: GSport_Internet_Starter_Kit.zip Source4: %{name}.png Source5: %{name}.desktop Source6: %{name}.appdata.xml Patch0: %{name}-xdg.patch Requires: xorg-x11-fonts-misc Requires: pulseaudio-utils BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libpcap-devel BuildRequires: dos2unix BuildRequires: perl BuildRequires: gcc-c++ %description GSport 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. %package internet_starter_kit Requires: %{name} = %{version}-%{release} Summary: Sweet 16 Internet Starter Kit Group: Applications/Emulators %description internet_starter_kit This package contains Ewen Wannop's "Sweet 16 Starter Kit" tailored for the GSport emulator. %prep %autosetup -T -b0 -a3 -p1 # fixup wrong-file-end-of-line-encoding dos2unix GSport\ Internet\ Starter\ Kit/GSport-readme.txt %build # Setup linux vars pushd src cat >vars <<'EOF' TARGET = gsportx OBJECTS = $(OBJECTS1) $(TFEOBJ) $(ATOBJ) $(PCAPOBJ) xdriver.o CC = gcc CCOPTS = -O2 -Wall -fomit-frame-pointer -std=gnu99 -DHAVE_TFE -DHAVE_ATBRIDGE -DTOGGLE_STATUS OPTS = -DGSPORT_LITTLE_ENDIAN SUFFIX = NAME = gsportx LDFLAGS = LDOPTS = LD = g++ EXTRA_LIBS = -lXext -ldl EXTRA_SPECIALS = AS = cc PERL = perl XOPTS = -I/usr/X11R6/include EOF %make_build %clean rm -rf $RPM_BUILD_ROOT %install install -d $RPM_BUILD_ROOT/%{_sysconfdir}/%{name} install -D -m 0755 gsportx $RPM_BUILD_ROOT/%{_bindir}/gsport.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 install -D -m 0644 %{SOURCE6} $RPM_BUILD_ROOT/%{_datadir}/appdata/%{name}.appdata.xml # Internet Starter Kit install -D -m 0644 'GSport Internet Starter Kit/GSport Internet Starter Kit.2mg' \ $RPM_BUILD_ROOT/%{_datadir}/%{name}/Internet_Starter_Kit.2mg # 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 GSportX via PulseAudio OSS Wrapper to enable # sound via the older /dev/dsp interface. # 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 padsp %{_bindir}/%{name}.bin -audio 1 EOF desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE5} appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/appdata/*.appdata.xml %files %defattr(-,root,root) %doc COPYING.txt %attr(755,root,root) %{_bindir}/* %{_datadir}/%{name}/* %{_datadir}/appdata/* %{_datadir}/applications/* %{_datadir}/pixmaps/* %exclude %{_datadir}/%{name}/Internet_Starter_Kit.2mg %files internet_starter_kit %doc "GSport Internet Starter Kit/*.txt" "GSport Internet Starter Kit/*.pdf" %{_datadir}/%{name}/Internet_Starter_Kit.2mg %changelog * Sat Aug 25 2018 Greg Wildman - 0.31-15 - Add auto download of GS rom files. - Patch to get closer to XDG spec. - Change binary to "gsport" * Thu May 24 2018 Greg Wildman - 0.31-11 - Fix build dependencies. * 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.