# Versions are like 1.0.5-r619. The first part (1.0.5 in this example) # goes into the Version: field, the rest (rc2-r619 here) into %%src_release. %global src_release 929 %global src_version %{version}-r%{src_release} %global repo_url https://downloads.sourceforge.net/project/%{name}/%{version}/ Summary: Cars Sports Racing: Simulation Name: cars-sports-racing Version: 2.1.2 Release: %autorelease Epoch: 1 # Contains LGPLv2 files also published under GPLv2+ License: GPL-3.0-or-later AND GPL-2.0-or-later AND CC-BY-SA-4.0 URL: https://www.cars-sports-racing.net/ Source0: %{?repo_url}%{name}-src-all-%{src_version}.tar.xz ExcludeArch: s390x Provides: %{name} = %{epoch}:%{version}-%{release} Requires: %{name}-data-base = %{epoch}:%{version} Requires: opengl-games-utils BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: chrpath BuildRequires: libcurl-devel BuildRequires: desktop-file-utils BuildRequires: enet-devel BuildRequires: expat-devel BuildRequires: freealut-devel BuildRequires: freeglut-devel BuildRequires: FreeSOLID-devel BuildRequires: libGL-devel BuildRequires: OpenSceneGraph-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libXi-devel BuildRequires: libXmu-devel BuildRequires: libXrandr-devel BuildRequires: plib-devel BuildRequires: SDL2-devel BuildRequires: SDL2_mixer-devel BuildRequires: libogg-devel BuildRequires: libvorbis-devel #BuildRequires: java-devel # Dont provide or require internal libs. Using new rpm builtin filtering, # see http://www.rpm.org/wiki/PackagerDocs/DependencyGenerator %global __requires_exclude liblearning.so %global __requires_exclude %{__requires_exclude}|libcsnetworking.so %global __requires_exclude %{__requires_exclude}|libraceengine.so %global __requires_exclude %{__requires_exclude}|librobottools.so %global __requires_exclude %{__requires_exclude}|libtgf.so %global __requires_exclude %{__requires_exclude}|libtgfclient.so %global __requires_exclude %{__requires_exclude}|libtgfdata.so %global __requires_exclude %{__requires_exclude}|libportability.so %global __provides_exclude_from %{_libdir}/games/cars-sports-racing/.*\\.so %description A fork of the open racing car simulator Speed Dreams, itself being a fork of Torcs This project implementing challenges for the player with races - Unlock next level with championship1 OpenGL1 (with PLIB) and OpenGL3 (OpenSceneGraph - WIP) are implemented. Best lap recorded in masterserver and in the future, hall of fame for championship ranking Career mode with possible tuning cars is implemented %package data-base Summary: Cars Sports Racing datas BuildArch: noarch Provides: %{name} = %{epoch}:%{version}-%{release} %description data-base This package contains tracks and cars for the game. %package devel Summary: The Cars Sports Racing development files Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description devel This package contains the development files for the game. %prep %setup -q -c -n %{name}-src-base-%{version}-%{release} # fixes spurious-executable-perm find . -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' | \ xargs chmod 644 %build %cmake -DCMAKE_BUILD_TYPE:STRING=Release \ -DCMAKE_SKIP_RPATH:BOOL=OFF \ -DOPTION_DEBUG:STRING=ON \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \ -DCSR_BINDIR:PATH=bin \ -DOPTION_3RDPARTY_SOLID:BOOL=ON \ -DOPTION_TRACKEDITOR:BOOL=OFF \ -DOPTION_OFFICIAL_ONLY:BOOL=ON \ -DOPTION_CLIENT_SERVEUR:BOOL=ON \ -DOPTION_WEBSERVER:BOOL=ON \ -DOPTION_OPENGL3:BOOL=ON \ -DOPTION_AUTOVERSION=OFF \ -D CSR_LOCALDIR=~/.config/cars-sports-racing %cmake_build %install %cmake_install find %{buildroot} -type f -name "*.cmake" -delete mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF [Desktop Entry] Name=Cars Sports Racing Comment=Simulation Exec=%{name} Icon=%{name} Terminal=false Type=Application StartupNotify=false Categories=Game;SportsGame; EOF install -D -m644 data/data/icons/icon.png %{builroot}%{_iconsdir}/%{name}.png # Register as an application to be visible in the software center mkdir -p %{buildroot}%{_datadir}/appdata cp packaging/appdata/%{name}.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml pushd %{buildroot}%{_libdir}/games/%{name} # Change rpath to refer only private lib dir. for lib in $(find . -type f -name \*.so ); do # Bug: cmake should make so-files 755 on Fedora by default. chmod 755 $lib chrpath --replace %{_libdir}/games/%{name}/lib $lib done # https://sourceforge.net/p/speed-dreams/tickets/730/ cd drivers for base in axiom; do for lib in ${base}_*; do cd $lib cmp ../$base/$base.so *.so && ln -sf ../$base/$base.so *.so cd .. done done # Check that %%{buildroot}%%{_libdir}/games/%%{name}/lib doesn't # contain unfiltered libs. cd ../lib excluded=$( echo '%{__requires_exclude}' | tr '|' ':' ) for lib in *.so; do if [ "${excluded/${lib}/}" = "$excluded" ]; then echo "ERROR: $lib not filtered in __requires_exclude" >&2 exit 2 fi done popd # removed userman and faq documentation, because it's depreciated rm -rf docs; mkdir docs cp -a %{buildroot}%{_datadir}/games/%{name}/*.txt docs cp -a %{buildroot}%{_datadir}/games/%{name}/*.xml docs # remove zero length files find %{buildroot} -size 0 -delete %files %license COPYING.txt %doc docs/*.xml docs/*.txt %{_mandir}/man6/* %{_bindir}/%{name} %{_bindir}/csr-* %{_libdir}/games/%{name}/ %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_iconsdir}/%{name}.png %{_datadir}/games/%{name}/ %exclude %{_datadir}/games/%{name}/cars/ %exclude %{_datadir}/games/%{name}/config/ %exclude %{_datadir}/games/%{name}/data/ %exclude %{_datadir}/games/%{name}/drivers/ %exclude %{_datadir}/games/%{name}/tracks/ %files data-base %{_datadir}/games/%{name}/cars/ %{_datadir}/games/%{name}/config/ %{_datadir}/games/%{name}/data/ %{_datadir}/games/%{name}/drivers/ %{_datadir}/games/%{name}/tracks/ %files devel %{_includedir}/%{name}/ %changelog * Wed Jan 28 2026 shadow72 - 1:2.1.2-0 - Fix bug with lost images in tuning page - Fix bug with setup & cars tuned - Update to 2.1.2 * Mon Jan 19 2026 shadow72 - 1:2.1.0-1 - Update to Release 2.1.0 * Fri Nov 15 2024 Xavier Bertaux - 1:1.0.5-1 - First import