%global debug_package %{nil} %global ename GoatTracker %global sname goattrk2 %undefine _package_note_file Name: goattracker Version: 2.77 Release: 1%{?dist} Summary: Crossplatform C64 music tracker Group: Applications/Multimedia License: GPLv2+ URL: https://sourceforge.net/projects/goattracker2/ Source0: https://downloads.sourceforge.net/goattracker2/%{ename}_%{version}.zip BuildRequires: gcc-c++ BuildRequires: SDL-devel BuildRequires: dos2unix unix2dos BuildRequires: devscripts %description Crossplatform C64 music tracker. Includes also the tools gt2reloc ins2snd2 mod2sng sngspli2. %prep %setup -q -c %{sname} # set full CFLAGS sed -i 's|CFLAGS+=`sdl-config --cflags`|CFLAGS=`sdl-config --cflags` %{build_cflags} -fdata-sections -ffunction-sections %{build_ldflags} -Wl,-s,--gc-sections -Ibme -Iasm|' src/makefile # set full CXXFLAGS sed -i 's|CXXFLAGS+=$(CFLAGS) -fpermissive|CXXFLAGS=`sdl-config --cflags` %{build_cxxflags} -fdata-sections -ffunction-sections %{build_ldflags} -Wl,-s,--gc-sections -Ibme -Iasm|' src/makefile.common # disable debug symbols sed -i 's| -g -| -|' src/makefile sed -i 's| -g -| -|' src/makefile.common # no extra CFLAGS sed -i 's|CFLAGS+=|#CFLAGS+=|' src/makefile.common sed -i 's|CFLAGS+=|#CFLAGS+=|' src/bme/makefile # force LDFLAGS (again) sed -i 's|LIBS+=`sdl-config --libs`|LIBS=`sdl-config --libs` %{build_ldflags} -Wl,-s,--gc-sections|' src/makefile sed -i 's|(CC) -o|(CC) %{build_ldflags} -Wl,-s,--gc-sections -o|' src/makefile.common # avoid strip sed -i '/strip/d' src/makefile.common sed -i '/strip/d' src/bme/makefile # Fix line and set UTF-8 encoding dos2unix {authors,readme.txt} iconv --from=ISO-8859-1 --to=UTF-8 readme.txt > readme.txt.utf8 mv -f readme.txt.utf8 readme.txt %build cd src find . -type f -name '*.o' -exec rm {} + %make_build %install mkdir -p %buildroot{%_bindir,%_datadir/%name,%_docdir/%name,%_datadir/applications,%_datadir/pixmaps} cp -a linux/{%sname,gt2reloc,ins2snd2,mod2sng,sngspli2} %buildroot%_bindir cp -ar examples %buildroot%_datadir/%name cp -a goat_tracker_commands.pdf %buildroot%_docdir/%name cp -a readme.txt %buildroot%_docdir/%name/README cp -a authors copying %buildroot%_docdir/%name cp -a morphos/%sname.info %buildroot%_datadir/pixmaps/%sname.png cat > %buildroot%_datadir/applications/%name.desktop << EOF2 [Desktop Entry] Name=%ename Exec=%sname Comment=Crossplatform C64 music tracker Terminal=false X-MultipleArgs=false Type=Application Icon=%sname.png Categories=AudioVideo;AudioVideoEditing; MimeType=audio/sng; EOF2 hardening-check -v linux/{%sname,gt2reloc,ins2snd2,sngspli2} hardening-check -fv linux/mod2sng %files %defattr(644, root, root, 755) %attr(755,root,root) %_bindir/* %_datadir/%name/* %_docdir/%name/* %_datadir/applications/%name.desktop %_datadir/pixmaps/%sname.png %changelog * Fri Jan 24 2025 samoht0 2.77 - update 2.77 - spec and history cleanup