Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mnhauke:games
unvanquished
unvanquished.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File unvanquished.spec of Package unvanquished
# # spec file for package unvanquished # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: unvanquished Version: 0.54.1 Release: 0 Summary: Sci-fi RTS and FPS game License: GPL-3.0-only Group: Amusements/Games/Action/Shoot URL: https://unvanquished.net #Git-Clone: https://github.com/Unvanquished/Unvanquished.git Source: Unvanquished-%{version}.tar.xz # NaCL SDK is a buildtime dependency of Dæmon - use the prebuild NaCL from upstream ... Source6: https://dl.unvanquished.net/deps/linux-amd64-default_10.tar.xz #Source10: %{name}-service.sh #Source11: server.cfg ###Source12: https://github.com/Unvanquished/Unvanquished/raw/master/archlinux/configs/maprotation.cfg #Source12: maprotation.cfg Source20: NOTES.txt Source99: %{name}-rpmlintrc BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: libjpeg-devel #BuildRequires: lua-devel BuildRequires: ncurses-devel BuildRequires: pkgconfig #BuildRequires: python3 #BuildRequires: python3-Jinja2 #BuildRequires: python3-pyaml BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(gmp) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(nettle) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(opusfile) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(zlib) ExclusiveArch: x86_64 # bundled libs Provides: bundled(breakpad) Provides: bundled(crunch) Provides: bundled(findlocale) Provides: bundled(googletest) Provides: bundled(minizip) Provides: bundled(mumblelink) Provides: bundled(nacl) Provides: bundled(pdcursesmod) Provides: bundled(tinyformat) %description Build a base, defend it against the other team, gain credits for better weapons or more advanced aliens, try to wipe them out. %prep %setup -q -n Unvanquished-%{version} tar xxvf %{SOURCE6} -C daemon/external_deps rm -Rf daemon/libs/zlib %build #%%cmake mkdir build && cd build cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_CGAME=OFF \ -DBUILD_SGAME=OFF \ -DUSE_BREAKPAD=ON \ -DUSE_GEOIP=OFF \ -DDAEMON_CBSE_PYTHON_PATH=%{_bindir}/python3 %make_build %install # Docs + Notes cp -a %{SOURCE20} ./ # Icons for i in 32 64 128 256 512 ; do install -Dm 0644 dist/icons/${i}x${i}/unvanquished.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png done ## Service Home #install -Dm 640 %{SOURCE11} %{buildroot}%{_service_home}/config/server.cfg #install -Dm 640 %{SOURCE12} %{buildroot}%{_service_home}/game/maprotation.cfg #install -d %{buildroot}%{_service_home}/pkg install -d %{buildroot}%{_libdir}/%{name} # ## Application install -m 755 build/daemon build/daemonded build/daemon-tty build/crash_server %{buildroot}%{_libdir}/%{name}/ ## Helpers install -m 755 build/nacl_helper_bootstrap build/nacl_loader %{buildroot}%{_libdir}/%{name}/ install -m 755 build/irt_core-amd64.nexe %{buildroot}%{_libdir}/%{name}/ # NOTE: 'irt_core-x86.nexe' is getting stripped or tweaked after build # in packaging, and causes failure at runtime with an IPC error. # Protect 'irt_core-amd64.nexe from getting 'stripped'. export NO_BRP_STRIP_DEBUG='true' # == Command Interface == mkdir command-ui pushd command-ui # Run a game client # ---------------------- cat >> %{name} <<EOF #!/bin/sh app_args='' uri='' while [ \$# -gt 0 ]; do case "\$1" in # handle URI unv:// passed in unv://*) uri=\$(echo "\$1" | grep -o '^unv://[^[:space:]+;]*') app_args="\${app_args} +connect \${uri}" ;; *) app_args="\${app_args} \$1" ;; esac shift done # Note: argument stucture changed in alpha 37: # -set <variable> <value> is now the preferred way to set a configuration variable. # +set <variable> <value> and +<command> are only applied after engine initialization. exec %{_libdir}/%{name}/daemon -libpath %{_libdir}/%{name} -pakpath %{_datadir}/%{name}/pkg \${app_args} EOF # ---------------------- ## Run a game server ## ---------------------- #cat >> %{name}-server <<EOF ##!/bin/sh # ## Note: argument stucture changed in alpha 37: ## -set <variable> <value> is now the preferred way to set a configuration variable. ## +set <variable> <value> and +<command> are only applied after engine initialization. #exec %{_libdir}/%{name}/daemonded -libpath %{_libdir}/%{name}/ -pakpath %{_datadir}/%{name}/pkg -curses "\$@" #EOF ## ---------------------- install -d %{buildroot}%{_bindir} install -m 755 %{name} %{buildroot}%{_bindir}/ #install -m 755 %{name}-server %{buildroot}%{_bindir}/ # Desktop launcher # Don't use a suse-macro to support other distributions # ---------------------- cat >> %{name}.desktop <<EOF [Desktop Entry] Categories=Game;ActionGame; Name=Unvanquished GenericName=sci-fi RTS and FPS mashup Type=Application Exec=%{name} Icon=%{name} MimeType=x-scheme-handler/unv; EOF # ---------------------- install -Dm 644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop #%pre service #%# Server Setup of User / Group #%getent group %{_service_user} >/dev/null || groupadd -r %{_service_user} #%getent passwd %{_service_user} >/dev/null || useradd -r -g %{_service_user} \ #% -d %{_service_home} -s /bin/false -c "Unvanquished Dedicated Server" %{_service_user} #% #%%service_add_pre %{_service}.service #% #%%post service #%#%%{fillup_only -n %{_service}} #%%service_add_post %{_service}.service #% #%# TODO?: (how to symlink file not created by this spec) #%#ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{_service} #% #%%preun service #%%service_del_preun %{_service}.service #% #%%postun service #%%service_del_postun %{_service}.service %files %license COPYING.txt GPL.txt %doc NOTES.txt README.md %{_bindir}/unvanquished #%%{_bindir}/unvanquished-server %{_libdir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/unvanquished.png #%%files service #%%doc NOTES.txt #%%config %{_fillupdir}/sysconfig.%{_service} #%%{_unitdir}/%{_service}.service #% #%%attr(750,%{_service_user},%{_service_user}) %dir %{_service_home}/ #%%attr(750,%{_service_user},%{_service_user}) %dir %{_service_home}/config/ #%%attr(750,%{_service_user},%{_service_user}) %dir %{_service_home}/game/ #%%attr(750,%{_service_user},%{_service_user}) %dir %{_service_home}/pkg/ #% #%%attr(0750,%{_service_user},%{_service_user}) %{_service_home}/%{name}-service.sh #%%attr(0750,%{_service_user},%{_service_user}) %{_service_home}/%{_service}-cmd #%%%attr(0640,%{_service_user},%{_service_user}) %config(noreplace) %{_service_home}/config/server.cfg #%%%attr(0640,%{_service_user},%{_service_user}) %config(noreplace) %{_service_home}/game/maprotation.cfg %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