Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:munix9:unstable
openparsec
openparsec.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openparsec.spec of Package openparsec
# # spec file for package openparsec # # copyright (c) 2024 munix9@googlemail.com # %define _gcdb aa9cc4129c0b04a1a39750d0ad551f8904be3c61 Name: openparsec Version: 0.3.0 Release: 0 Summary: 3D space shooter game License: GPL-2.0-only URL: https://www.openparsec.com/ Source0: https://github.com/OpenParsec/openparsec/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # https://github.com/mdqinc/SDL_GameControllerDB Source10: https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/%{_gcdb}/gamecontrollerdb.txt Patch0: fix-no-return-in-nonvoid-function.patch Patch1: fix-makeodt-build.patch Patch2: fix-log-file-path.patch Patch3: fix-bin-wrapper.patch Patch4: fix-desktop-file.patch Patch5: fix-metainfo_xml.patch Patch6: fix-server_service.patch Patch7: fix-sdl-compat.patch Patch8: fix-unused-variable-nextrand.patch BuildRequires: AppStream BuildRequires: help2man BuildRequires: hicolor-icon-theme BuildRequires: pkgconfig BuildRequires: premake4 BuildRequires: update-desktop-files BuildRequires: pkgconfig(SDL2_mixer) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(ncurses) Requires: %{name}-assets Provides: %{name}-client = %{version} Suggests: %{name}-server %{?systemd_ordering} %if 0%{?suse_version} <= 1500 BuildRequires: gcc10-PIE BuildRequires: gcc10-c++ %else BuildRequires: gcc-c++ %endif %description Fast-paced multiplayer cross-platform 3D Internet space combat game with amazing soundtrack. %package server Summary: 3D space shooter game server Suggests: %{name}-client %description server Fast-paced multiplayer cross-platform 3D Internet space combat game server. %package tools Summary: Tools for OpenParsec %description tools This package contains tools for OpenParsec. %prep %autosetup -p1 %build # segfaults with optimization export CFLAGS="%{optflags} -Wno-invalid-offsetof -O0 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -DPARSEC_DEBUG" #export CXXFLAGS="$CFLAGS" %if 0%{?suse_version} <= 1500 export CC=gcc-10 export CXX=g++-10 %endif pushd platforms/premake premake4 gmake %make_build config=debug%{__isa_bits} verbose=1 popd # makeodt for f in QvLib BspLib makeodt ; do %make_build -C tool_src/$f clean all done %install install -d -m 0755 %{buildroot}%{_bindir} %{buildroot}%{_sbindir} \ %{buildroot}%{_prefix}/lib/%{name} cp -a parsec_root/{client,server} %{buildroot}%{_prefix}/lib/%{name} find %{buildroot}%{_prefix}/lib/%{name} -type f -name .gitignore -delete find %{buildroot}%{_prefix}/lib/%{name} -type f -exec chmod 0644 {} ';' chmod 0755 %{buildroot}%{_prefix}/lib/%{name}/client/parsec \ %{buildroot}%{_prefix}/lib/%{name}/server/parsec_server chmod 0644 LICENSE* # gamecontrollerdb.txt install -m 0644 -t %{buildroot}%{_prefix}/lib/%{name}/client %{SOURCE10} echo "%{_gcdb}" > %{buildroot}%{_prefix}/lib/%{name}/client/gamecontrollerdb.version # wrapper install -m 0755 debian/parsec %{buildroot}%{_bindir}/%{name} install -m 0755 debian/parsec-server %{buildroot}%{_bindir}/%{name}-server ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-server install -D -m 0644 -t %{buildroot}%{_unitdir} debian/%{name}-server.service # move/link configs to /etc install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/server mv %{buildroot}%{_prefix}/lib/%{name}/server/{boot_sv,settings}.con \ %{buildroot}%{_sysconfdir}/%{name}/server ln -sf %{_sysconfdir}/%{name}/server/boot_sv.con %{buildroot}%{_prefix}/lib/%{name}/server ln -sf %{_sysconfdir}/%{name}/server/settings.con %{buildroot}%{_prefix}/lib/%{name}/server # link dummy assets dirs/files into client dir install -d -m 0755 %{buildroot}%{_datadir}/%{name} pushd %{buildroot}%{_prefix}/lib/%{name}/client for f in Images cons init.con openparsec.ico pscdata{0,1,2,3}.dat do touch %{buildroot}%{_datadir}/%{name}/${f} ln -s %{_datadir}/%{name}/${f} done popd # desktop install -D -m 0644 debian/com.%{name}.client.desktop \ %{buildroot}%{_datadir}/applications/com.%{name}.%{name}.desktop install -D -m 0644 -t %{buildroot}%{_datadir}/icons/hicolor/256x256/apps debian/%{name}.png %suse_update_desktop_file com.%{name}.%{name} # appdata/metainfo install -D -m 0644 debian/com.%{name}.client.metainfo.xml \ %{buildroot}%{_datadir}/metainfo/com.%{name}.%{name}.metainfo.xml appstreamcli validate --no-net %{buildroot}%{_datadir}/metainfo/com.%{name}.%{name}.metainfo.xml # makeodt install -m 0755 -t %{buildroot}%{_bindir} tool_src/makeodt/makeodt chmod 0644 tool_src/makeodt/COPYING tool_src/makeodt/planet1.wrl \ tool_src/makeodt/test_ship tool_src/makeodt/test_ship2.vrml # man page cp -fp %{buildroot}%{_prefix}/lib/%{name}/client/parsec /tmp/%{name} export PATH=/tmp:$PATH install -d -m 0755 %{buildroot}%{_mandir}/man6 help2man -N -s 6 -n "3D space shooter game" --version-string="%{version}" \ -o %{buildroot}%{_mandir}/man6/%{name}.6 %{name} %pre -n %{name}-server %service_add_pre %{name}-server.service %post -n %{name}-server %service_add_post %{name}-server.service %preun -n %{name}-server %service_del_preun %{name}-server.service %postun -n %{name}-server %service_del_postun %{name}-server.service %files %license LICENSE LICENSE.readme debian/copyright %doc CREDITS README.md docs/tutorial.txt %{_bindir}/%{name} %dir %{_prefix}/lib/%{name} %{_prefix}/lib/%{name}/client %{_datadir}/applications/com.%{name}.%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/metainfo/com.%{name}.%{name}.metainfo.xml %{_mandir}/man6/%{name}.6%{?ext_man} %dir %{_sysconfdir}/%{name} %dir %{_datadir}/%{name} %exclude %{_datadir}/%{name}/* %files server %license LICENSE LICENSE.readme debian/copyright %doc CREDITS README.md docs/tutorial.txt %{_bindir}/%{name}-server %{_sbindir}/rc%{name}-server %dir %{_prefix}/lib/%{name} %{_prefix}/lib/%{name}/server %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/server %config(noreplace) %{_sysconfdir}/%{name}/server/* %{_unitdir}/%{name}-server.service %files tools %license tool_src/makeodt/COPYING %doc docs/makeodt_readme.txt tool_src/makeodt/planet1.wrl %doc tool_src/makeodt/test_ship tool_src/makeodt/test_ship2.vrml %{_bindir}/makeodt %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor